-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
98 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
l2-unity/Assets/Scripts/Game/Manager/StateMachine/State/CharSelectState.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
using UnityEngine; | ||
|
||
public class CharSelectState : GameStateBase | ||
{ | ||
public CharSelectState(GameManager stateMachine) : base(stateMachine) { } | ||
|
||
public override void Enter(object arg0) | ||
{ | ||
L2LoginUI.Instance.ShowCharSelectWindow(); | ||
|
||
CharSelectWindow.Instance.SetCharacterList(CharacterSelector.Instance.Characters); | ||
|
||
CharacterSelector.Instance.ApplyCharacterList(); | ||
CharacterSelector.Instance.SelectDefaultCharacter(); | ||
|
||
CharSelectWindow.Instance.SelectSlot(CharacterSelector.Instance.SelectedSlot); | ||
|
||
LoginCameraManager.Instance.SwitchCamera("CharSelect"); | ||
} | ||
|
||
public override void Update() | ||
{ | ||
|
||
} | ||
|
||
public override void HandleEvent(GameEvent evt, object arg0) | ||
{ | ||
switch (evt) | ||
{ | ||
case GameEvent.GAME_DISCONNECTED: | ||
L2LoginUI.Instance.ShowLoginWindow(); | ||
_stateMachine.ChangeState(GameState.LOGIN_SCREEN); | ||
break; | ||
case GameEvent.AUTH_ALLOWED: | ||
break; | ||
default: | ||
Debug.LogWarning($"[GameStateMachine] Unhandled event {evt} for state {_stateMachine.State}"); | ||
break; | ||
} | ||
} | ||
} |
2 changes: 2 additions & 0 deletions
2
l2-unity/Assets/Scripts/Game/Manager/StateMachine/State/CharSelectState.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters