示例#1
0
    private void Start()
    {
        myMaster = GetComponent <Character>();

        idle       = new CharacterIdle(myMaster, this);
        locomotion = new CharacterLocomotion(myMaster, this);
        jump       = new CharacterJump(myMaster, this);
        fall       = new CharacterFall(myMaster, this);
        climb      = new CharacterClimb(myMaster, this);
        crouch     = new CharacterCrouch(myMaster, this);
        zapped     = new CharacterZapped(myMaster, this);
        turn       = new CharacterTurn(myMaster, this);
        interact   = new CharacterInteract(myMaster, this);
        death      = new CharacterDeath(myMaster, this);
        dialogue   = new CharacterDialogue(myMaster, this);
        disabled   = new CharacterDisabled(myMaster, this);
        train      = new CharacterEventTrain(myMaster, this);

        currentState = idle;

        //Special event niveau 1
        if (!GameManager.instance.spcLvlMan.hasHead)
        {
            ChangeState(train);
        }
    }
示例#2
0
    private void UpdateClimb(Animator animator, CharacterClimb climb)
    {
        if (!climb)
        {
            return;
        }

        animator.SetBool(hHanging, climb.IsHanging);
        animator.SetBool(hIsClimbingUp, climb.IsClimbingUp);
    }