public virtual void RemoveGuest(CObjectController value)
 {
     if (m_Guests.Contains(value) == false)
     {
         return;
     }
     m_Guests.Remove(value);
 }
 public override void SetCurrentBlock(CObjectController value)
 {
     base.SetCurrentBlock(value);
     if (value != null && m_MovableComponent != null)
     {
         m_MovableComponent.LookForwardToTarget(value.GetPosition());
     }
 }
 public virtual void AddGuest(CObjectController value)
 {
     if (m_Guests.Contains(value) || value == this)
     {
         return;
     }
     m_Guests.Add(value);
 }
 public virtual void SetCurrentBlock(CObjectController value)
 {
     if (m_CurrentBlock != null && Application.isPlaying)
     {
         CGameManager.Instance.OnObjectLeaveBlock(this, m_CurrentBlock);
     }
     m_CurrentBlock = value;
     if (value != null && Application.isPlaying)
     {
         CGameManager.Instance.OnObjectEnterBlock(this, value);
     }
 }
Exemple #5
0
 public void RegisterObject(CObjectController value)
 {
     if (value == null || value.GetActive() == false)
     {
         return;
     }
     if (m_SequenceList.Contain(value))
     {
         return;
     }
     m_SequenceList.Enqueue(value);
     m_UIManager.RegisterUIAvatar(value);
 }
Exemple #6
0
 public void UnRegisterObject(CObjectController value)
 {
     if (value == null)
     {
         return;
     }
     if (m_SequenceList.Contain(value) == false)
     {
         return;
     }
     m_SequenceList.Remove(value);
     value.ResetBaseGame();
     m_UIManager.UnRegisterUIAvatar(value);
 }
 public override void SetTargetAlly(CObjectController value)
 {
     base.SetTargetAlly(value);
     if (value != null)
     {
         switch (value.GetObjectType())
         {
         case CEnum.EObjectType.Hero:
             m_TargetAlly = value;
             break;
         }
     }
     else
     {
         m_TargetAlly = value;
     }
 }
Exemple #8
0
        public virtual void OnObjectStartTurn()
        {
            var turn = m_TurnCount + 1;

            m_TurnCount = turn;
            OnTurnChange(m_TurnCount);
            objectSelected = m_SequenceList.Peek();
            if (objectSelected == null)
            {
                return;
            }
            objectSelected.OnEndTurn -= OnObjectEndTurn;
            objectSelected.OnEndTurn += OnObjectEndTurn;
            objectSelected.SetTurnState(CEnum.ETurnState.StartTurn);
            m_UIManager.SetAnimation(CEnum.EUIState.Idle);
            m_CameraController.target = objectSelected.transform;
            m_UIManager.target        = objectSelected;
        }
 public FSMBaseControllerState(IContext context) : base(context)
 {
     m_Controller = context as CObjectController;
 }
Exemple #10
0
        public virtual void OnObjectLeaveBlock(CObjectController guest, CObjectController block)
        {
            var currentBlock = block as CBlockController;

            currentBlock.RemoveGuest(guest);
        }
Exemple #11
0
        public virtual void OnObjectEnterBlock(CObjectController guest, CObjectController block)
        {
            var currentBlock = block as CBlockController;

            currentBlock.AddGuest(guest);
        }
Exemple #12
0
 public void UnRegisterUIAvatar(CObjectController value)
 {
 }
 public virtual void SetOwner(CObjectController value)
 {
 }
 public virtual void SetTargetBlock(CObjectController value)
 {
     m_TargetBlock = value;
 }
 public virtual void SetTargetAlly(CObjectController value)
 {
 }