Example #1
0
    void OnEnable()
    {
        instance = this;

        if (Selection.activeGameObject == null)
        {
            return;
        }
        mBall = Selection.activeGameObject.GetComponent <UBasketball>();
        if (mBall == null)
        {
            EditorUtility.DisplayDialog("ShootSolutionEditor", "请选择篮球", "ok");
        }

        GameObject goBasket = GameObject.FindGameObjectWithTag("basketStand");

        if (goBasket == null)
        {
            EditorUtility.DisplayDialog("ShootSolutionEditor", "请先创建篮板", "ok");
        }
        mBasket = goBasket.GetComponent <UBasket>();

        mDistanceCount = GameSystem.Instance.shootSolutionManager.m_DistanceList.Count;
        mAngleCount    = GameSystem.Instance.shootSolutionManager.m_AngleList.Count;
    }
Example #2
0
 void OnDisable()
 {
     instance = null;
 }