Example #1
0
 void Start()
 {
     observe   = gameObject.AddComponent <ObservingMove>();
     viewAngle = gameObject.AddComponent <ViewingAngle>();
     observe.Init(AI, startPos, speed, observeRange);
     anim.SetInteger("state", 0);
 }
Example #2
0
    void Start()
    {
        //Goblin Move pattern

        follow       = gameObject.AddComponent <FollowTarget>();
        viewAngle    = gameObject.AddComponent <ViewingAngle>();
        returnToHome = gameObject.AddComponent <ReturnMove>();

        weapon.GetComponent <AxColision>().SetDamage(atk);

        follow.Init(AI, target, speed, 0);
        returnToHome.init(AI, startPos, speed);


        anim.SetInteger("state", 0);
    }