Ejemplo n.º 1
0
 void ICtrlElementNode.SetEleClose()
 {
     m_Borned      = false;
     m_CurEleState = CElement.EleState.Close;
     m_AtkRange.gameObject.SetActive(false);
     TurretEnded();
 }
Ejemplo n.º 2
0
 void ICtrlElementNode.SetEleOpen()
 {
     m_CurEleState = CElement.EleState.Open;
     m_AtkRange.gameObject.SetActive(true);
     PlayTurretAnim(m_TurretAnim, true);
     StartBorn();
 }
 void ICtrlElementNode.SetEleClose()
 {
     m_CurEleState           = CElement.EleState.Close;
     GetCollider2D().enabled = false;
     if (m_FireEffect != null)
     {
         m_FireEffect.Stop();
     }
 }
 void ICtrlElementNode.SetEleOpen()
 {
     m_CurEleState           = CElement.EleState.Open;
     GetCollider2D().enabled = true;
     if (m_FireEffect != null)
     {
         m_FireEffect.Play();
     }
 }
Ejemplo n.º 5
0
 void ICtrlElementNode.SyncStartEleState(CElement.EleState eleState)
 {
     if (eleState == CElement.EleState.Open)
     {
         ((ICtrlElementNode)this).SetEleOpen();
     }
     else
     {
         ((ICtrlElementNode)this).SetEleClose();
     }
 }
Ejemplo n.º 6
0
 void ICtrlElementNode.SyncStartEleState(CElement.EleState eleState)
 {
     m_Gun = GetComponentInChildren <Gun>();
     if (eleState == CElement.EleState.Open)
     {
         SetChildActive(false);
         gameObject.AddComponent <DelayCallBack>().SetAction(() =>
         {
             SetChildActive(true);
             PlayTurretAnim(m_TurretAnim, true);
             StartBorn();
         }, 0.1f);
         m_CurEleState = CElement.EleState.Open;
         m_AtkRange.gameObject.SetActive(true);
     }
     else if (eleState == CElement.EleState.Close)
     {
         ((ICtrlElementNode)this).SetEleClose();
     }
 }
Ejemplo n.º 7
0
 void ICtrlElementNode.SetEleClose()
 {
     m_CurEleState = CElement.EleState.Close;
 }
Ejemplo n.º 8
0
 void ICtrlElementNode.SetEleOpen()
 {
     m_Animator.enabled = true;
     m_CurEleState      = CElement.EleState.Open;
 }