示例#1
0
        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}");
        }
示例#2
0
    // 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);
 }