// ----- Engine funktioner ----- \\ private void OnCollisionEnter(Collision collision) { if (networkMaster == true) { IShip ship = collision.gameObject.GetComponent <IShip>(); if (ship != null) { if (ship != firedFromShip) { ship.ApplyDamage(firedFromShip.GetCannonDamage()); firedFromShip.GetGameManager().OnCannonBallDestroyed(this); } } else { Mine mine = collision.gameObject.GetComponent <Mine>(); if (mine != null) { mine.MineDestroyed(); } firedFromShip.GetGameManager().OnCannonBallDestroyed(this); } } }