-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inject the triggering-signal to the command if so requested. #21
base: master
Are you sure you want to change the base?
Conversation
On cases when the instance of the triggering signal is necessary inside the Command it can now be requested it's injection by using the [Inject(name="trigger")] tag in the Command as so: [Inject(name="trigger")] public var triggerSignal:ISignal; This was mainly created to obtain the actual QualifiedClassName of the trigger (ISignal). But many other uses can be also applied.
I can't quite imagine a use case where this is necessary, i.e. where there's no better approach, but obviously I can be mistaken. Could you provide an example of such a use case? |
Hi Creynders, Of course! so, this change was made for the sole purpose of coding a new RL2 library possible. This library is called SALSA and it stands for "Signal Activated Library (of) Sound Assets". And it works this way: The Main Salsa instance will be provided with a list of sounds (.json) that will:
The tricky parts came when we started to load sub-swf's and the main SALSA was managing all the components Sounds or child-SALSAS. For this we required to have in the Command the trigger Signal so that we could compare it to the Signals mapped in the children-SALSA. Like I said, specially when we have composition is necessary to have the trigger-Signal injected in such a way. We will be open-sourcing the lib also. But to open-source the lib only makes sense if the pull-request is merged to the SignalCommandMap else everybody would need to get our fork and would be a bit messy. |
Hmmm... I don't quite get why you'd want to use RL for this directly, but probably I'm just not seeing the whole picture. Anyway, a LOT (i.e. everything) has changed in the SCM since you created the PR so it can't be accepted anyhow. That said we could provide the mapping you're looking for, but I'm not sure whether we should. It is an extra (named !) mapping and ... yeah, I don't know, I'm not convinced I guess. But the decision is not mine to make anyway. @pixels4nickels what do you think? |
I'll clean up a bit the code of the lib and add a READ me so that you can have a look at it and tell us if you maybe see a better solution to our needs. At the time we invested 2 days trying to avoid the named mapping, but honestly had no other weapon left. I'll post the link here |
I used SALSA library and I can only say that it is amazing. I guess, you could look at code, and maybe suggest the better solution if there is any. If there is not, well it is a great library and great addition for RL |
@GV3 cool, let me know when you're ready! |
Hey guys,
|
On cases when the instance of the triggering signal is necessary inside the Command it can now be requested it's injection by using the [Inject(name="trigger")] tag in the Command as so:
This was mainly created to obtain the actual QualifiedClassName of the trigger (ISignal). But many other uses can be also applied.