void Start()
    {
        PLAYER = GameObject.Find("Hero");
        ARMY = GameObject.Find("FellowHeroes");

        oc = GetComponentInChildren<ObstacleCreator>();
        ec = GetComponentInChildren<EnemyCreator>();
        bc = GetComponentInChildren<BoulderCreator>();

        timer = DifficultyIncreaseTimer;

        LEVEL_LENGTH_Z = LevelCreator.LengthConverter(LevelCreator.LEVEL_LENGTH) * 64 - 32;

        if (LevelCreator.INF_MODE)
        {
            SOLDIER_RATIO = 1;
            ec.RecalcTimer();
            CATAPULT_RATIO = 1;
            bc.RecalcTimer();
            OBSTACLE_RATIO = 1;
            oc.RecalcTimer();
            GUIScript.DIFFICULTY_INCREASE = 1;

            GUIScript.MAX_TIMER = DifficultyIncreaseTimer;
            GUIScript.INF_TIMER = 0;
        }
    }
示例#2
0
 public void SetPool(Pool pool)
 {
     paths = pool.GetGroup(Matcher.PathsModel);
     enemies = pool.GetGroup(Matcher.EnemiesModel);
     difficulty = pool.GetGroup(Matcher.DifficultyController);
     enemyCreator = new EnemyCreator(pool);
     bossCreator = new BossCreator(pool);
     weaponProvider = new WeaponProvider();
     Random.seed = pool.count;
 }
示例#3
0
    // ================================================================ //
    // MonoBehaviour からの継承.
    void Start()
    {
        this.player = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerControl>();

        //

        this.last_block.is_created = false;

        this.level_control = new LevelControl();
        this.level_control.initialize();
        this.level_control.loadLevelData(this.level_data_text);

        this.player.level_control = this.level_control;

        //

        this.game_root     = this.gameObject.GetComponent<GameRoot>();
        this.block_creator = this.gameObject.GetComponent<BlockCreator>();
        this.coin_creator  = this.gameObject.GetComponent<CoinCreator>();
        this.enemy_creator = this.gameObject.GetComponent<EnemyCreator>();

        this.block_creator.map_creator = this;
        this.coin_creator.map_creator = this;
        this.enemy_creator.map_creator = this;

        //

        this.create_floor_block();
    }