Esempio n. 1
0
    private void Start()
    {
        PlayerTrans = GameObject.Find("Player").transform;
        AnimCntrl   = GetComponent <GhostAnimCntrl>();

        WalkDirGroup    = new Vector2[8];
        WalkDirGroup[0] = new Vector2(0, 1);
        WalkDirGroup[1] = new Vector2(0.7f, 0.7f);
        WalkDirGroup[2] = new Vector2(1, 0);
        WalkDirGroup[3] = new Vector2(0.7f, -0.7f);
        WalkDirGroup[4] = new Vector2(0, -1);
        WalkDirGroup[5] = new Vector2(-0.7f, -0.7f);
        WalkDirGroup[6] = new Vector2(-0.7f, 0.7f);
        WalkDirGroup[7] = new Vector2(0, 1);

        RunningAI = AIState.WalkAround;
        WalkAroundRoutine();
    }
Esempio n. 2
0
 private void Start()
 {
     AnimCntrl  = transform.parent.GetComponent <GhostAnimCntrl>();
     MoveCntrl  = transform.parent.GetComponent <GhostMoveCntrl>();
     PlayerStat = GameObject.Find("Player").GetComponent <PlayerStatManager>();
 }