public void SetCharacterIcons(CharacterSelectionType character) { switch (character) { case CharacterSelectionType.PEPITO: if (_ArrowLocation != null) { _ArrowLocation.GetComponentInChildren <Image>().color = Color.green; } _MyCharacterIcons[0] = _HeroIcons[2]; _MyCharacterIcons[1] = _HeroIcons[3]; break; case CharacterSelectionType.JUANITO: if (_ArrowLocation != null) { _ArrowLocation.GetComponentInChildren <Image>().color = Color.blue; } _MyCharacterIcons[0] = _HeroIcons[4]; _MyCharacterIcons[1] = _HeroIcons[5]; break; default: if (_ArrowLocation != null) { _ArrowLocation.GetComponentInChildren <Image>().color = Color.magenta; } _MyCharacterIcons[0] = _HeroIcons[0]; _MyCharacterIcons[1] = _HeroIcons[1]; break; } _StatusIcon.sprite = _MyCharacterIcons[1]; }
/// <summary> /// Firing animation of Character Loading or selection /// </summary> public void LoadingOrSelectionChar(ControllerType playerController, CharacterSelectionType characterSelection, bool status) { switch (characterSelection) { case CharacterSelectionType.Up: UpAnim.SetBool("LoadSelect", status); ChangeColorForSelection(UpImageToColor, status ? BattleManagerScript.Instance.playersColor[(int)playerController] : Color.white); break; case CharacterSelectionType.Down: DownAnim.SetBool("LoadSelect", status); ChangeColorForSelection(DownImageToColor, status ? BattleManagerScript.Instance.playersColor[(int)playerController] : Color.white); break; case CharacterSelectionType.Left: LeftAnim.SetBool("LoadSelect", status); ChangeColorForSelection(LeftImageToColor, status ? BattleManagerScript.Instance.playersColor[(int)playerController] : Color.white); break; case CharacterSelectionType.Right: RightAnim.SetBool("LoadSelect", status); ChangeColorForSelection(RightImageToColor, status ? BattleManagerScript.Instance.playersColor[(int)playerController] : Color.white); break; } }
private void ShowPlayerDead(int deadCount, CharacterSelectionType character, bool isMine) { if (isMine == false) { _DeadAnnouncement.StartCoroutine("PlayerDeadAnnouncement", character); } }
public IEnumerator PlayerDeadAnnouncement(CharacterSelectionType character) { _DeadPlayerImage.enabled = true; _HeroDeadTxt.text = character.ToString() + " died!"; _DeadPlayerImage.sprite = _CharacterIcons[(int)character]; yield return(new WaitForSeconds(2.0f)); _HeroDeadTxt.text = ""; _DeadPlayerImage.enabled = false; }
/// <inheritdoc /> public CharacterCharacterSelectionRequestPayload(byte slotSelected, CharacterSelectionType selectionType) { if (!Enum.IsDefined(typeof(CharacterSelectionType), selectionType)) { throw new InvalidEnumArgumentException(nameof(selectionType), (int)selectionType, typeof(CharacterSelectionType)); } //TODO: Should we do slot number validation? SlotSelected = slotSelected; SelectionType = selectionType; }
public CharacterBaseInfoClass(string name, CharacterSelectionType characterSelection, List <ControllerType> playerController, CharacterNameType characterName, WalkingSideType walkingSide, AttackType charAttackType, BaseCharType bCharType) { Name = name; CharacterSelection = characterSelection; PlayerController = playerController; CharacterName = characterName; WalkingSide = walkingSide; CharAttackType = charAttackType; BCharType = bCharType; }
public string GetButtonTypeString(CharacterSelectionType input) { return(""); //Use this bit if each selection should have unique text switch (input) { case (CharacterSelectionType.Up): return(buttonTypeB); case (CharacterSelectionType.Down): return(buttonTypeA); case (CharacterSelectionType.Left): return(buttonTypeX); case (CharacterSelectionType.Right): return(buttonTypeY); default: return(null); } }
public void SetUICharacterToButton(CharacterType_Script character, CharacterSelectionType buttonToAssignTo) { GetvitalityBoxOfAssignedButton(buttonToAssignTo, character.UMS.Side).SetCharacter(character.CharInfo); }
public NewICharacterVitality GetvitalityBoxOfAssignedButton(CharacterSelectionType inButton, SideType side) { return(vitalityBoxes.Where(r => r.assignedButton == inButton && r.mapSide == side).FirstOrDefault()); }
public void StopLoadSelectCharacter(CharacterSelectionType characterSelection, ControllerType controllerType) { BattleManagerScript.Instance.Switch_StopLoadingNewCharacter(characterSelection, controllerType); }
public void LoadSelectCharacter(CharacterSelectionType characterSelection, ControllerType controllerType) { //Debug.Log("Loading"); BattleManagerScript.Instance.Switch_LoadingNewCharacterInRandomPosition(characterSelection, controllerType); }
public void SelectCharacter(CharacterSelectionType characterSelection, ControllerType controllerType) { BattleManagerScript.Instance.SetCharacterSelection(characterSelection, controllerType); }
public UIIconClass(BaseCharacter charIcon, CharacterSelectionType characterSelection) { CharIcon = charIcon; CharacterSelection = characterSelection; }
public void SetCharSelected(ControllerType playerController, CharacterSelectionType selection) { LoadingOrSelectionChar(playerController, LastSelectedD[playerController], false); LastSelectedD[playerController] = selection; LoadingOrSelectionChar(playerController, selection, true); }