예제 #1
0
        private void spawn()
        {
            float  fXRelative = UnityEngine.Random.value;
            float  fYRelative = UnityEngine.Random.value;
            float  fX         = (m_collider.bounds.max.x - m_collider.bounds.min.x) * fXRelative + m_collider.bounds.min.x;
            float  fY         = (m_collider.bounds.max.y - m_collider.bounds.min.y) * fYRelative + m_collider.bounds.min.y;
            Tripod tripod     = m_tripodFactory.Create();

            tripod.trans.position = new Vector3(fX, fY);
            m_fTimeTillNextSpawn  = m_fSpawnRate;
        }
예제 #2
0
 public void CollidedWith(Tripod _tripod)
 {
     m_sumo.increaseAmmo();
     m_audioSourceCollect.Play();
     _tripod.Destroy();
 }