예제 #1
0
파일: Ball.cs 프로젝트: LeoguoEx/miniTennis
 void Start()
 {
     GameBallManager.GetInstance().RegisterBall(this);
     m_rigidBody = GetComponent <Rigidbody2D>();
     m_particle  = GetComponentInChildren <ParticleSystem>();
     if (m_particle != null)
     {
         m_particle.gameObject.SetActive(false);
     }
 }
예제 #2
0
    public override void EnterState()
    {
        m_target = GameBallManager.GetInstance().GetTargetBall();
        if (m_target == null)
        {
            GameStart.GetInstance().LogModuel.Log(ELogType.Error, "TargetBall is null");
            return;
        }

        if (m_entity != null)
        {
            m_entity.Switch(EEntityState.Prepare, Vector2.zero);
        }
    }
예제 #3
0
파일: Ball.cs 프로젝트: LeoguoEx/miniTennis
 private void OnDestroy()
 {
     GameBallManager.GetInstance().UnRegisterBall(this);
 }