void Start()
 {
     EventTire = this.GetEventTire();
     BaseMoveState = GetComponent<BaseMoveState>();
     EventTire.AddEventListener(TireEventType.ChangedMoveStateEvent, OnChangedMoveStateEvent);
     EventTire.AddEventListener(TireEventType.ChangedDirectionEvent, OnChangedDirectionEvent);
 }
Пример #2
0
    void Start()
    {
        EventTire = this.GetEventTire();
        BaseState = GetComponent<BaseMoveState>();
        UpperCollider.enabled = true;

        EventTire.AddEventListener(TireEventType.ControlEvent, OnControlEvent);
        EventTire.AddEventListener(TireEventType.ChangedSitDownEvent, OnChangedSitDownEvent);
    }
Пример #3
0
    void Start()
    {
        EventTire = this.GetEventTire();
        BaseState = GetComponent<BaseMoveState>();
        Rigidbody = GetComponent<Rigidbody2D>();

        Rigidbody.gravityScale = 1f;
        EventTire.AddEventListener(TireEventType.ControlEvent, OnControlEvent);
        EventTire.AddEventListener(TireEventType.ChangedMoveStateEvent, UpdateHorizontalMoveState);
        EventTire.AddEventListener(TireEventType.ChangedShiftWalkEvent, UpdateHorizontalMoveState);
        EventTire.AddEventListener(TireEventType.ChangedJumpStateEvent, OnPlayerChangedJumpStateEvent);
    }
    void Start()
    {
        EventTire = this.GetEventTire();
        Rigidbody = GetComponent<Rigidbody2D>();
        BaseState = GetComponent<BaseMoveState>();
        BaseState.VerticalMoveState = VerticalMoveState.Idle;
        BaseState.MoveState = MoveState.Idle;

        EventTire.AddEventListener(TireEventType.ControlEvent, OnControlEvent);
        EventTire.AddEventListener(TireEventType.ChangedMoveStateEvent, UpdateHorizontalMoveState);
        EventTire.AddEventListener(TireEventType.ChangedVerticalMoveStateEvent, UpdateVerticalMoveState);
        EventTire.AddEventListener(TireEventType.ChangedJumpStateEvent, OnPlayerChangedJumpStateEvent);
        Rigidbody.gravityScale = 0f;
    }
Пример #5
0
 protected void AddState(TState state, BaseMoveState stateData, TState?endState = null, Func <bool> isRange = null, Func <bool> isAction = null)
 {
     StateMachine.AddState(state, stateData);
     if (endState != null)
     {
         MoveTargetStateDatas.Add(state, new Tuple <TState, Func <bool>, Func <bool> >(endState.Value, isRange, isAction));
         if (isRange == null && isAction == null)
         {
             MoveTargetStateToNode.Add(state);
         }
         else
         {
             MoveTargetStateToUnit.Add(state);
         }
     }
 }
 void Start()
 {
     EventTire = this.GetEventTire();
     BaseMoveState = GetComponent<BaseMoveState>();
     EventTire.AddEventListener(TireEventType.ControlEvent, OnControlEvent);
 }