Пример #1
0
 public override void Execute()
 {
     base.Execute();
     if (this.savePrefType == "SET_PREF")
     {
         AutoStoryTriggerUtils.SaveTriggerValue(this.savePrefName, this.saveValue);
     }
     else if (this.savePrefType == "CLEAR_PREF")
     {
         AutoStoryTriggerUtils.ClearTriggerValue(this.savePrefName);
     }
     this.parent.ChildComplete(this);
 }
Пример #2
0
 public EatResponse OnEvent(EventId id, object cookie)
 {
     if (id == EventId.PlanetRelocate)
     {
         string text = (string)cookie;
         if (this.isFirstRelocation)
         {
             if (!string.IsNullOrEmpty(this.saveVarName))
             {
                 AutoStoryTriggerUtils.SaveTriggerValue(this.saveVarName, text);
             }
             this.parent.SatisfyTrigger(this);
         }
         else if (text.Equals(this.planetVO.Uid))
         {
             this.parent.SatisfyTrigger(this);
         }
     }
     return(EatResponse.NotEaten);
 }