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; }
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(); } }
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; }
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++; }
void OnCollision(CollisionMsg msg) { //logique de collision }
void OnCollision(CollisionMsg msg) { Entity target = msg.First == Owner ? msg.Second : msg.First; Owner.Dispose(); }