Exemple #1
0
 void OnSceneStateValue(bool isGlobal, string name, SceneState.StateValue val)
 {
     if (isGlobal && name == hpModFlagsKey)
     {
         ApplyHPMod();
     }
 }
Exemple #2
0
        void StateCallback(string aName, SceneState.StateValue newVal)
        {
            if (!output.IsNone)
            {
                switch (output.Type)
                {
                case VariableType.Int:
                    output.SetValue(newVal.ival);
                    break;

                case VariableType.Float:
                    output.SetValue(newVal.fval);
                    break;

                case VariableType.String:
                    output.SetValue(newVal.sval);
                    break;

                case VariableType.Bool:
                    output.SetValue(newVal.ival != 0);
                    break;
                }
            }

            if (!FsmEvent.IsNullOrEmpty(changeEvent))
            {
                Fsm.Event(changeEvent);
            }

            Finish();
        }
        void StateCallback(bool aGlobal, string aName, SceneState.StateValue newVal)
        {
            if (global == aGlobal && name.Value == aName)
            {
                if (!iValueOut.IsNone)
                {
                    iValueOut = newVal.ival;
                }

                if (!fValueOut.IsNone)
                {
                    fValueOut = newVal.fval;
                }

                if (!FsmEvent.IsNullOrEmpty(changeEvent))
                {
                    Fsm.Event(changeEvent);
                }

                Finish();
            }
        }