コード例 #1
0
 public override void InitializeStates(out BaseState default_state)
 {
     default_state = unoperational;
     root.Update(UpdateStatusItems, UpdateRate.SIM_200ms, false);
     unoperational.EventTransition(GameHashes.OperationalChanged, operational, (Instance smi) => smi.IsOperational).PlayAnim("off");
     operational.DefaultState(operational.not_ready).EventTransition(GameHashes.OperationalChanged, unoperational, (Instance smi) => !smi.IsOperational);
     operational.not_ready.EventTransition(GameHashes.OnStorageChange, operational.ready, (Instance smi) => smi.IsReady()).PlayAnim("off");
     operational.ready.ToggleChore(CreateShowerChore, operational.not_ready);
 }
 public override void InitializeStates(out BaseState default_state)
 {
     default_state     = operational;
     base.serializable = true;
     unoperational.TagTransition(GameTags.Operational, operational, false);
     operational.DefaultState(operational.manual).TagTransition(GameTags.Operational, unoperational, true);
     operational.manual.ParamTransition(automated, operational.automated, GameStateMachine <FixedCapturePoint, Instance, IStateMachineTarget, Def> .IsTrue);
     operational.automated.ParamTransition(automated, operational.manual, GameStateMachine <FixedCapturePoint, Instance, IStateMachineTarget, Def> .IsFalse).ToggleChore((Instance smi) => smi.CreateChore(), unoperational, unoperational).Update("FindFixedCapturable", delegate(Instance smi, float dt)
     {
         smi.FindFixedCapturable();
     }, UpdateRate.SIM_1000ms, false);
 }
コード例 #3
0
    public override void InitializeStates(out BaseState default_state)
    {
        default_state = notoperational;
        root.Enter(SetupFishFeederTopAndBot).Exit(CleanupFishFeederTopAndBot).EventHandler(GameHashes.OnStorageChange, OnStorageChange);
        notoperational.TagTransition(GameTags.Operational, operational, false);
        operational.DefaultState(operational.on).TagTransition(GameTags.Operational, notoperational, true);
        operational.on.DoNothing();
        int num = 19;

        ballSymbols = new HashedString[num];
        for (int i = 0; i < num; i++)
        {
            ballSymbols[i] = "ball" + i.ToString();
        }
    }