示例#1
0
    void Awake()
    {
        print("gm awake");

        GameObject canvas = GameObject.Find("Canvas");

        if (isBattle)
        {
            tracker     = canvas.GetComponent <GameControlNetwork>();
            utilityCore = new BattleCore();
        }

        else
        {
            tracker     = canvas.GetComponent <GameControl>();
            utilityCore = new NormalCore();
        }

        gCubesListener += handleCubes;
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        print("pc start");

        mAudioSource.mute = isMute();
        tracker           = manager.getGameTracker();

        // 設定玩家方塊初始位置
        GameObject floorCube;

        while (true)
        {
            int floorCubeIndex = Random.Range(1, 145);
            floorCube = cubesHandler.getFloorCube(floorCubeIndex);
            if (floorCube.CompareTag(TAG_UNTAGGED))
            {
                mPlayerFloorCubeIndex = floorCubeIndex;
                break;
            }
        }
        transform.position = floorCube.transform.position + Vector3.up;
    }