public override void InitializeStates(out BaseState default_state) { default_state = building; base.serializable = true; building.Update(delegate(Instance smi, float dt) { pee_fuse.Delta(0f - dt, smi); }, UpdateRate.SIM_200ms, false).Transition(paused, (Instance smi) => IsSleeping(smi), UpdateRate.SIM_200ms).Transition(critical, (Instance smi) => pee_fuse.Get(smi) <= 60f, UpdateRate.SIM_200ms); critical.Update(delegate(Instance smi, float dt) { pee_fuse.Delta(0f - dt, smi); }, UpdateRate.SIM_200ms, false).Transition(paused, (Instance smi) => IsSleeping(smi), UpdateRate.SIM_200ms).Transition(pee, (Instance smi) => pee_fuse.Get(smi) <= 0f, UpdateRate.SIM_200ms); paused.Transition(building, (Instance smi) => !IsSleeping(smi), UpdateRate.SIM_200ms); pee.ToggleChore(CreatePeeChore, building); }
public override void InitializeStates(out BaseState default_state) { default_state = decomposing; base.serializable = true; decomposing.ParamTransition(decompositionAmount, convertDestroy, (StatesInstance smi, float p) => p >= 600f).Update("Decomposing", delegate(StatesInstance smi, float dt) { decompositionAmount.Delta(dt, smi); }, UpdateRate.SIM_200ms, false); convertDestroy.Enter(delegate(StatesInstance smi) { smi.master.ConvertToElement(); }); }