コード例 #1
0
    /**
     * Produces a singleton on awake
     */
    override public void Start()
    {
        if (state == null)
        {
            DontDestroyOnLoad(gameObject);
            state = this;
        }
        else if (state != this)
        {
            Destroy(gameObject);
        }

        state.resourceBuildings   = new Dictionary <Tuple, ResourceBuilding>();
        state.decorativeBuildings = new Dictionary <Tuple, DecorativeBuilding>();
        state.residenceBuildings  = new Dictionary <Tuple, ResidenceBuilding>();

        buildingInformationManager = new BuildingInformationManager();
        woolyBeans = 0;
        poofLimit  = 0;
    }
コード例 #2
0
    /**
     * Produces a singleton on awake
     */
    public override void Start()
    {
        if (state == null) {
            DontDestroyOnLoad(gameObject);
            state = this;
        } else if (state != this) {
            Destroy(gameObject);
        }

        state.resourceBuildings = new Dictionary<Tuple, ResourceBuilding>();
        state.decorativeBuildings = new Dictionary<Tuple, DecorativeBuilding>();
        state.residenceBuildings = new Dictionary<Tuple, ResidenceBuilding>();

        buildingInformationManager = new BuildingInformationManager();
        woolyBeans = 0;
        poofLimit = 0;
    }