Beispiel #1
0
 protected virtual void OnHitGround()
 {
     if (m_animator != null)
     {
         m_animator.SetTrigger("hit_ground");
     }
     Object.Destroy(GetComponent <Rigidbody2D>());
     Object.Destroy(GetComponent <CircleCollider2D>());
     m_state = mg_bc_EObjectState.STATE_FADING_ON_GROUND;
 }
Beispiel #2
0
 public void FlyingUpdate(float _delta)
 {
     if (m_state == mg_bc_EObjectState.STATE_FADING_ON_GROUND)
     {
         SpriteRenderer componentInChildren = GetComponentInChildren <SpriteRenderer>();
         Color          color = componentInChildren.color;
         float          num   = color.a - 1f * _delta;
         componentInChildren.color = new Color(color.r, color.g, color.b, num);
         if (num <= 0f)
         {
             m_state = mg_bc_EObjectState.STATE_TO_DESTROY;
         }
     }
 }
Beispiel #3
0
 public void Destroy()
 {
     m_state = mg_bc_EObjectState.STATE_TO_DESTROY;
 }