Ejemplo n.º 1
0
    void Start()
    {
        sprite  = GetComponent <tk2dSprite>();
        curAnim = GetComponent <tk2dSpriteAnimator>();
        CC      = GetComponent <CharacterController>();

        //Debug.Log("in Zombie Start");

        if (curState != ZombieState.Cutscene)
        {
            _wander = transform.GetComponent <ZombieWander>();
            _chase  = transform.FindChild("ZombieDetectionRange").GetComponent <ZombieChase>();
        }
        // Do the wander change in here, then add a "changeStateToWander" Function

        // Start and stop animation so it doesn't glitch if interacting before animating starts
        curAnim.Play();
        curAnim.Stop();
    }
Ejemplo n.º 2
0
    void Start()
    {
        sprite = GetComponent<tk2dSprite>();
        curAnim = GetComponent<tk2dSpriteAnimator>();
        CC = GetComponent<CharacterController>();

        //Debug.Log("in Zombie Start");

        if(curState != ZombieState.Cutscene){
            _wander = transform.GetComponent<ZombieWander>();
            _chase = transform.FindChild("ZombieDetectionRange").GetComponent<ZombieChase>();
        }
        // Do the wander change in here, then add a "changeStateToWander" Function

        // Start and stop animation so it doesn't glitch if interacting before animating starts
        curAnim.Play();
        curAnim.Stop();
    }