public void TransitionToStageSelect(PlayerCharacterEnum _pc1, PlayerCharacterEnum _pc2) { if (_pc1 == PlayerCharacterEnum.length_empty || _pc1 == PlayerCharacterEnum.random) { Debug.Log("PlayerCharacter1 の値が不正です"); _pc1 = PlayerCharacterEnum.airos; } if (_pc2 == PlayerCharacterEnum.length_empty || _pc2 == PlayerCharacterEnum.random) { Debug.Log("PlayerCharacter2 の値が不正です"); _pc2 = PlayerCharacterEnum.airos; } this.commonData.playerCharacter1 = _pc1; this.commonData.playerCharacter2 = _pc2; this.currentState = State.StageSelect; this.stateManager.SetState(this.currentState); }
public Sprite GetAlp(PlayerCharacterEnum _chara) { return(this.alpDict[_chara]); }
public Sprite GetKana(PlayerCharacterEnum _chara) { return(this.kanaDict[_chara]); }
public Sprite Get(PlayerCharacterEnum _chara) { return(this.dict[_chara]); }
private bool ReturnFunc(PlayerNumber _pl) { SelecterStates state = null; PlayerCharacterEnum pc = PlayerCharacterEnum.length_empty; Images images = null; Sprite sprite = null; if (_pl == PlayerNumber.player1) { state = this.pl1States; pc = this.charaSelectorSets[this.pl1States.NowIndex].PlayerCharacter; images = this.pl1Images; sprite = this.sprites.StandBackActive1; } if (_pl == PlayerNumber.player2) { state = this.pl2States; pc = this.charaSelectorSets[this.pl2States.NowIndex].PlayerCharacter; images = this.pl2Images; sprite = this.sprites.StandBackActive2; } if (state.IsSelected) { return(true); } if (pc == PlayerCharacterEnum.length_empty || pc == PlayerCharacterEnum.emilia || pc == PlayerCharacterEnum.laxa || pc == PlayerCharacterEnum.vega_al) { // SE: AudioManager.Instance.PlaySe(SoundEffectEnum.error); return(false); } else if (pc == PlayerCharacterEnum.random) { var random = new Random(); int index; while (true) { index = random.Next(0, (int)PlayerCharacterEnum.length_empty); pc = this.charaSelectorSets[index].PlayerCharacter; if (pc != PlayerCharacterEnum.random && pc != PlayerCharacterEnum.emilia && pc != PlayerCharacterEnum.laxa && pc != PlayerCharacterEnum.vega_al && pc != PlayerCharacterEnum.length_empty) { break; } } state.PlayerCharacter = pc; state.IsSelected = true; images.StandBack.sprite = sprite; var tmp = state.NowIndex; state.NowIndex = index; UpdateCursor(tmp); UpdateCursor(state.NowIndex); UpdateStand(_pl); UpdateNames(_pl); // SE: AudioManager.Instance.PlaySe(SoundEffectEnum.decision); return(true); } else { state.PlayerCharacter = pc; state.IsSelected = true; images.StandBack.sprite = sprite; UpdateCursor(state.NowIndex); // SE: AudioManager.Instance.PlaySe(SoundEffectEnum.decision); return(true); } }