private void OnTransitionedAction(StateMachine <ElevatorState, ElevatorTrigger> .Transition transition) { ElevatorTrigger trigger = transition.Trigger; ElevatorState source = transition.Source; ElevatorState dest = transition.Destination; Debug.WriteLine($"Elevator:{Name}, Floor:{CurrentFloor}, Trigger: {trigger}, {source}-->{dest}"); }
// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody>(); moving = false; next_pos = rb.position; trigger_script = elevator_trigger.GetComponent <ElevatorTrigger>(); }
public ElevatorTileBehaviour(Tile tile, KeyValuePairs kvp) : base(tile, kvp) { Distance = kvp.GetInteger("distance", 1); Speed = 1.0f / Robot.Robot.STEP_TIME; Direction = kvp.GetEnum("direction", ElevatorDirection.Up); Trigger = kvp.GetEnum("trigger", ElevatorTrigger.Powered); RiseSoundPath = kvp.GetString("rise_sound", null); FallSoundPath = kvp.GetString("fall_sound", null); }