public void RpcEndGame(LobbyPlayer.PlayerTeam teamWon) { // Display on screen of you lost or won GameManager._instance.GameFinished(teamWon); //Server isEngGame = true; timerNewGame = Utility.StartTimer(timeBeforeNewGame); }
public void GameFinished(LobbyPlayer.PlayerTeam teamLost) { if (localPlayer.playerTeam == teamLost) { SoundManager._instance.PlaySound(SoundManager.SoundList.LOSE_SOUND); UpdateInfoText("Your team loses the game.."); } else { SoundManager._instance.PlaySound(SoundManager.SoundList.WIN_SOUND); UpdateInfoText("Your team wins the game !"); } }
public Sprite GetSprite(SkinType type, LobbyPlayer.PlayerTeam team, bool isDead = false) { if (team == LobbyPlayer.PlayerTeam.RED) { if (!isDead) { switch (type) { case SkinType.ANGRY: return(red_angrySkin); case SkinType.ANGRY_CAT: return(red_angryCatSkin); case SkinType.ANGRY_CHINESE: return(red_angryChineseSkin); case SkinType.ANGRY_CHINESE_CAT: return(red_angryChineseCatSkin); case SkinType.ANGRY_ROOK: return(red_angryRookSkin); case SkinType.CAT: return(red_catSkin); case SkinType.CHINESE: return(red_chineseSkin); case SkinType.CHINESE_CAT: return(red_chineseCatSkin); case SkinType.HAPPY: return(red_happySkin); case SkinType.HAPPY_CAT: return(red_happyCatSkin); case SkinType.NORMAL: return(red_normalSkin); } } else { switch (type) { case SkinType.ANGRY: case SkinType.ANGRY_ROOK: case SkinType.HAPPY: case SkinType.NORMAL: return(red_deadNormalSkin); case SkinType.ANGRY_CAT: case SkinType.CAT: case SkinType.ANGRY_CHINESE_CAT: case SkinType.CHINESE_CAT: case SkinType.HAPPY_CAT: return(red_deadCatSkin); case SkinType.CHINESE: case SkinType.ANGRY_CHINESE: return(red_deadChineseSkin); } } } else { if (!isDead) { switch (type) { case SkinType.ANGRY: return(blue_angrySkin); case SkinType.ANGRY_CAT: return(blue_angryCatSkin); case SkinType.ANGRY_CHINESE: return(blue_angryChineseSkin); case SkinType.ANGRY_CHINESE_CAT: return(blue_angryChineseCatSkin); case SkinType.ANGRY_ROOK: return(blue_angryRookSkin); case SkinType.CAT: return(blue_catSkin); case SkinType.CHINESE: return(blue_chineseSkin); case SkinType.CHINESE_CAT: return(blue_chineseCatSkin); case SkinType.HAPPY: return(blue_happySkin); case SkinType.HAPPY_CAT: return(blue_happyCatSkin); case SkinType.NORMAL: return(blue_normalSkin); } } else { switch (type) { case SkinType.ANGRY: case SkinType.ANGRY_ROOK: case SkinType.HAPPY: case SkinType.NORMAL: return(blue_deadNormalSkin); case SkinType.ANGRY_CAT: case SkinType.CAT: case SkinType.ANGRY_CHINESE_CAT: case SkinType.CHINESE_CAT: case SkinType.HAPPY_CAT: return(blue_deadCatSkin); case SkinType.CHINESE: case SkinType.ANGRY_CHINESE: return(blue_deadChineseSkin); } } } return(null); }
private void OnChangeTeam(LobbyPlayer.PlayerTeam newTeam) { UpdateSkin(); UpdateSpawnPosition(); }