Example #1
0
 void Start()
 {
     GameBallManager.GetInstance().RegisterBall(this);
     m_rigidBody = GetComponent <Rigidbody2D>();
     m_particle  = GetComponentInChildren <ParticleSystem>();
     if (m_particle != null)
     {
         m_particle.gameObject.SetActive(false);
     }
 }
Example #2
0
    public static GameBallManager GetInstance()
    {
        if (m_instance == null)
        {
            m_instance = new GameBallManager();
            m_instance.Init();
        }

        return(m_instance);
    }
Example #3
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);
        }
    }
Example #4
0
 private void OnDestroy()
 {
     GameBallManager.GetInstance().UnRegisterBall(this);
 }