Exemplo n.º 1
0
 void Start()
 {
     rb            = GetComponent <Rigidbody2D>();
     target        = GameObject.Find("AlphaWolf").GetComponent <Transform>();
     targetRb      = target.GetComponent <Rigidbody2D> ();
     stats         = GetComponent <WolfStatController> ();
     wpsController = GameObject.Find("GameController").GetComponent <WolfpackStrengthController> ();
     noiseOffset   = Random.value * 10.0f;
     active        = false;
     pursuing      = false;
     anim          = GetComponent <Animator> ();
     moving        = false;
     id            = gameObject.GetInstanceID();
     StartCoroutine("StartTick", pingFrequency);
 }
Exemplo n.º 2
0
 void Start()
 {
     rb = GetComponent<Rigidbody2D>();
     target = GameObject.Find ("AlphaWolf").GetComponent<Transform>();
     targetRb = target.GetComponent<Rigidbody2D> ();
     stats = GetComponent<WolfStatController> ();
     wpsController = GameObject.Find("GameController").GetComponent<WolfpackStrengthController> ();
     noiseOffset = Random.value * 10.0f;
     active = false;
     pursuing = false;
     anim = GetComponent<Animator> ();
     moving = false;
     id = gameObject.GetInstanceID ();
     StartCoroutine("StartTick", pingFrequency);
 }