Esempio n. 1
0
    public static void InvokeEventSequence(CharacterPawn pawn, ActorBase actor, string sequenceName)
    {
        Property.EventSequence sequence = Resources.Load <Property.EventSequence>(string.Format("Events/EventSequence/{0}", sequenceName));

        sequence.Init();
        sequence.CheckAndExecute(pawn, actor);
    }
Esempio n. 2
0
 public static void TriggerRemoteTriggers(CharacterPawn pawn, ActorBase actor, string filterName, string finderName, string sequenceName)
 {
     Property.TriggerFilter filter   = Resources.Load <Property.TriggerFilter>(string.Format("Trigger/TriggerFilter/{0}", filterName));
     Property.TargetFinder  finder   = Resources.Load <Property.TargetFinder>(string.Format("Trigger/TargetFinder/{0}", finderName));
     Property.EventSequence sequence = Resources.Load <Property.EventSequence>(string.Format("Events/EventSequence/{0}", sequenceName));
     if (filter != null && sequence != null)
     {
         foreach (Trigger trig in GameLoader.Instance.RemoteTriggers)
         {
             if (filter.Check(trig))
             {
                 trig.CallEventSequence(pawn.controller, finder, sequence);
             }
         }
     }
 }