void OnCollisionEnter(Collision col) { // We only want to listen for hits from the current client. // All other damage is done by synchronizing the health if (clientMode) { DamageReceiver cont = col.gameObject.GetComponent <DamageReceiver>(); if (cont != null) { cont.OnDamageReceived(10f, transform.position); GameLevelEventManager.OnPlayerProjectileHit(); } } Destroy(gameObject); Destroy(Instantiate(collisionPrefab, col.contacts[0].point, transform.rotation), 5f); }
public void PauseMenuResume() { GameLevelEventManager.OnPauseMenuResumeSelected(); }
public void ShipConfigMenuDestroyer() { GameLevelEventManager.OnShipConfigMenuShipSelected(ShipController.ShipType.DESTROYER); }
public void ShipConfigMenuFrigate() { GameLevelEventManager.OnShipConfigMenuShipSelected(ShipController.ShipType.FRIGATE); }
public void ShipConfigMenuFigther() { GameLevelEventManager.OnShipConfigMenuShipSelected(ShipController.ShipType.FIGHTER); }
public void TeamSelectMenuRed() { GameLevelEventManager.OnTeamSelectMenuTeamSelected(GameLevelSceneManager.TEAMTAG.RED); }
public void TeamSelectMenuBlue() { GameLevelEventManager.OnTeamSelectMenuTeamSelected(GameLevelSceneManager.TEAMTAG.BLUE); }
public void PauseMenuConfirmQuit() { GameLevelEventManager.OnPauseMenuConfirmQuitSelected(); }
/// <summary> /// This method is called when this script is about to be destroyed /// </summary> void OnDestroy() { GameLevelEventManager.OnShipDestroyed(this); }