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


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

        observe.Init(AI, startPos, 1.5f, observeRange);
        follow.Init(AI, target, speed, 0);
        returnToHome.init(AI, startPos, speed);

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