コード例 #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();
    }
コード例 #2
0
ファイル: ZombieSM.cs プロジェクト: newmanwillis/Dead_Week
    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();
    }