コード例 #1
0
ファイル: PlayerStatusUI.cs プロジェクト: jrpartida/LOTF
    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];
    }
コード例 #2
0
    /// <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;
        }
    }
コード例 #3
0
ファイル: HeroesUI.cs プロジェクト: jrpartida/LOTF
 private void ShowPlayerDead(int deadCount, CharacterSelectionType character, bool isMine)
 {
     if (isMine == false)
     {
         _DeadAnnouncement.StartCoroutine("PlayerDeadAnnouncement", character);
     }
 }
コード例 #4
0
    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;
    }
コード例 #5
0
        /// <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;
        }
コード例 #6
0
 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;
 }
コード例 #7
0
    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);
        }
    }
コード例 #8
0
 public void SetUICharacterToButton(CharacterType_Script character, CharacterSelectionType buttonToAssignTo)
 {
     GetvitalityBoxOfAssignedButton(buttonToAssignTo, character.UMS.Side).SetCharacter(character.CharInfo);
 }
コード例 #9
0
 public NewICharacterVitality GetvitalityBoxOfAssignedButton(CharacterSelectionType inButton, SideType side)
 {
     return(vitalityBoxes.Where(r => r.assignedButton == inButton && r.mapSide == side).FirstOrDefault());
 }
コード例 #10
0
 public void StopLoadSelectCharacter(CharacterSelectionType characterSelection, ControllerType controllerType)
 {
     BattleManagerScript.Instance.Switch_StopLoadingNewCharacter(characterSelection, controllerType);
 }
コード例 #11
0
 public void LoadSelectCharacter(CharacterSelectionType characterSelection, ControllerType controllerType)
 {
     //Debug.Log("Loading");
     BattleManagerScript.Instance.Switch_LoadingNewCharacterInRandomPosition(characterSelection, controllerType);
 }
コード例 #12
0
 public void SelectCharacter(CharacterSelectionType characterSelection, ControllerType controllerType)
 {
     BattleManagerScript.Instance.SetCharacterSelection(characterSelection, controllerType);
 }
コード例 #13
0
 public UIIconClass(BaseCharacter charIcon, CharacterSelectionType characterSelection)
 {
     CharIcon           = charIcon;
     CharacterSelection = characterSelection;
 }
コード例 #14
0
 public void SetCharSelected(ControllerType playerController, CharacterSelectionType selection)
 {
     LoadingOrSelectionChar(playerController, LastSelectedD[playerController], false);
     LastSelectedD[playerController] = selection;
     LoadingOrSelectionChar(playerController, selection, true);
 }