public override void StartState() { base.StartState(); m_Controller.SetAnimation(CEnum.EAnimation.Move); m_MapManager = CMapManager.GetInstance(); var currentBlock = m_Controller.GetCurrentBlock() as CBlockController; var randomStep = UnityEngine.Random.Range(1, 7); var nextBlock = m_MapManager.GetBlockStep(0, currentBlock, randomStep); m_Controller.SetTargetBlock(nextBlock); }
public virtual void OnObjectSelectRollDice() { var currentBlock = objectSelected.GetCurrentBlock() as CBlockController; var randomStep = UnityEngine.Random.Range(1, m_MapManager.mapData.limitStep + 1); var nextBlock = m_MapManager.GetBlockStep(0, currentBlock, randomStep); m_UIManager.SetAnimation(CEnum.EUIState.RollDice); m_UIManager.OnRollDiceComplete += () => { objectSelected.SetTargetBlock(nextBlock); objectSelected.SetRollDice(true); }; }