コード例 #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 static GameBallManager GetInstance()
    {
        if (m_instance == null)
        {
            m_instance = new GameBallManager();
            m_instance.Init();
        }

        return(m_instance);
    }
コード例 #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);
        }
    }
コード例 #4
0
ファイル: Ball.cs プロジェクト: LeoguoEx/miniTennis
 private void OnDestroy()
 {
     GameBallManager.GetInstance().UnRegisterBall(this);
 }