Пример #1
0
 private void initPlace()
 {
     //playerStatus
     mElement.mPlayerStatusDisplay = GamePlacer.placePlayerStatus(mElement.mStageData);
     //mas
     mElement.mMasDisplay = GamePlacer.placeMas(mElement.mStageData);
     //table
     mElement.mTable = GamePlacer.placeTable(mElement.mStageData);
 }
Пример #2
0
    public void showStage(string aFilePath)
    {
        if (mMasContainer != null)
        {
            mMasContainer.name = "deleted";
            mMasContainer.delete();
            mRouteContainer.name = "deleted";
            mRouteContainer.delete();
        }

        StageData tStageData = new StageData(aFilePath);

        mStageData = tStageData;
        GamePlacer.placeMas(tStageData);
        mMasContainer = GameObject.Find("masContainer").GetComponent <MyBehaviour>();
        mMasContainer.transform.SetParent(mStage.transform, false);
        mRouteContainer = GameObject.Find("routeContainer").GetComponent <MyBehaviour>();
        mRouteContainer.transform.SetParent(mStage.transform, false);
    }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        Arg tArg = MySceneManager.getArg("game");

        MySoundPlayer.playBgm("Morning_2", MySoundPlayer.LoopType.normalConnect, 0.7f);

        mElement = new GameElementData();

        mElement.mInitData         = tArg.get <GameInitData>("data");
        mElement.mStageData        = new StageData(mElement.mInitData.mStagePath);
        LandMasStatus.mLootingRate = mElement.mInitData.mLooting / 100.0f;

        initPlace();
        initStatus();
        //piece
        mElement.mPlayerPieces = GamePlacer.placePiece(mElement.mPlayerStatus, mElement.mMasDisplay[0].position2D);

        mMaster          = MyBehaviour.create <GameMaster>();
        mMaster.name     = "GameMaster";
        mMaster.mElement = mElement;
        mMaster.mMain    = this;

        mMaster.start();
    }
Пример #4
0
 void Start()
 {
     this.GetComponent <MeshRenderer>().enabled = false;
     gplacer = GameObject.Find("GamePlacer").GetComponent <GamePlacer>();
 }