private void Start()
 {
     audioSource  = GetComponent <AudioSource>();
     GameControl  = GameObject.Find("GamePlay").GetComponent <ManagementGame>();
     controller   = GetComponent <CharacterController>();
     radiusPlayer = GetComponent <CharacterController>().radius + 0.15f;//0.15f offset
     //GetComponent<Renderer>().bounds.extents.magnitude/2
 }
Exemple #2
0
 void Start()
 {
     mg = GetComponent <ManagementGame>();
     foreach (GameObject obj in prefab)
     {
         pool.Add(new ObjPool(obj));
     }
     InitPool();
 }
 protected override void BonusAdd(Transform other)
 {
     poolControl = GameObject.Find("GamePlay").GetComponent <ManagementGame>();
     poolControl.Stop(timeStopEnemy);
 }