public void Load(GridMap2D mapData, Transform rootTf) { m_RootTf = rootTf; m_MapData = mapData; m_TurnAgent = new TurnAgent(); m_TurnAgent.Cursor = new GameCursor(m_RootTf); m_MapSystem = GameManager.Instance.CreateSystem <SLGMapSystem>(m_MapData); m_TurnAgent.Arrow = new GameArrow(m_RootTf); m_TurnAgent.WorldCamera = new WorldCamera(GameObject.Find("GameLoop/Camera").transform); GameManager.Instance.AddInputEvent(OnInputMsg, 0); m_CharacterSystem = GameManager.Instance.CreateSystem <SLGCharacterSystem>(m_RootTf); m_TurnSystem = GameManager.Instance.CreateSystem <SLGTurnSystem>(m_TurnAgent); m_TurnAgent.TurnSystem = m_TurnSystem; Character ch = CS_CreateCharacterAtPoint(ECharacterRelation.OwnSide, 1); ch.SetCellPos(new IPoint(12, 2)); Character ch2 = CS_CreateCharacterAtPoint(ECharacterRelation.OwnSide, 2); ch2.SetCellPos(new IPoint(14, 2)); m_TurnAgent.Cursor_SetCellPos(ch.Point); m_TurnAgent.WorldCamera_FollowCellPos(ch.Point); GameManager.Instance.UIMgr.OpenUI <GameHud>(); m_TurnSystem.SwitchTurn(Common.ETurnType.OwnSide); }
public void Turn_SwitchTurn(Game.Common.ETurnType turn) { m_TurnSystem.SwitchTurn(turn); }