void Start() { GameBallManager.GetInstance().RegisterBall(this); m_rigidBody = GetComponent <Rigidbody2D>(); m_particle = GetComponentInChildren <ParticleSystem>(); if (m_particle != null) { m_particle.gameObject.SetActive(false); } }
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); } }
private void OnDestroy() { GameBallManager.GetInstance().UnRegisterBall(this); }