Пример #1
0
        void OnCollision(CollisionMsg msg)
        {
            Entity target = msg.First == Owner ? msg.Second : msg.First;
            Recruter recruter = target.GetComponent<Recruter>();
            if (recruter == null)
                return;

            Target = recruter.Owner;
        }
Пример #2
0
 void OnCollision(CollisionMsg message)
 {
     if (message.First.GetComponent<MainCharacter>() != null)
     {
         message.First.GetComponent<MainCharacter>().Dispose();
     }
     else if (message.Second.GetComponent<MainCharacter>() != null)
     {
         message.First.GetComponent<MainCharacter>().Dispose();
     }
 }
Пример #3
0
        void OnCollision(CollisionMsg msg)
        {
            if (m_TimeBeforeNextPlay > 0)
                return;

            SoundEffect effect = m_Sound.Get();

            effect.Play();
            m_TimeBeforeNextPlay = (float)effect.Duration.TotalSeconds;
            m_Playing = true;
        }
Пример #4
0
        void OnCollision(CollisionMsg msg)
        {
            if (msg.First.Name == "Eleve" || msg.Second.Name == "Eleve")
            {
                Game2D.gameHud.lives--;
                if (Game2D.gameHud.lives <= 0)
                {
                    Game2D.gameHud.lives = 0;
                }
            }

            //Game2D.gameHud.score++;
        }
Пример #5
0
 void OnCollision(CollisionMsg msg)
 {
     //logique de collision
 }
Пример #6
0
        void OnCollision(CollisionMsg msg)
        {
            Entity target = msg.First == Owner ? msg.Second : msg.First;

            Owner.Dispose();
        }