示例#1
0
#pragma warning restore 0414

    public PlayerCity()
    {
        ECityBuildingKey[] buildingKeys = Enum.GetValues(typeof(ECityBuildingKey)) as ECityBuildingKey[];
        _buildings = new CityBuildingInfo[buildingKeys.Length - 1];
        for (int i = 1; i < buildingKeys.Length; i++)
        {
            _buildings[i - 1] = new CityBuildingInfo(buildingKeys[i], 1);
        }

        //TODO: setup correct last refresh time
        _fuelRefresher = new PlayerFuelRefresher(Utils.UnixTimestamp);
        //TODO: start ongoing constructions

        //TODO: setup correct buildings info
        //TODO: setup correct upgrades info
        //TOOD: setup warehouse collect time
        if (IsWarehouseFilled)
        {
            OnWarehouseFilled();
        }
        else
        {
            GameTimer.Instance.AddListener(WarehouseCollectTime, OnWarehouseFilled);
        }
    }
示例#2
0
#pragma warning restore 0414
	
	public PlayerCity() {
		ECityBuildingKey[] buildingKeys = Enum.GetValues(typeof(ECityBuildingKey)) as ECityBuildingKey[];
		_buildings = new CityBuildingInfo[buildingKeys.Length - 1];
		for (int i = 1; i < buildingKeys.Length; i++) {
			_buildings[i - 1] = new CityBuildingInfo(buildingKeys[i], 1);
		}

		//TODO: setup correct last refresh time
		_fuelRefresher = new PlayerFuelRefresher(Utils.UnixTimestamp);
		//TODO: start ongoing constructions

		//TODO: setup correct buildings info
		//TODO: setup correct upgrades info
		//TOOD: setup warehouse collect time
		if (IsWarehouseFilled) {
			OnWarehouseFilled();
		} else {
			GameTimer.Instance.AddListener(WarehouseCollectTime, OnWarehouseFilled);
		}
	}