示例#1
0
    private void Awake()
    {
        grid = new GridStructure(cellSize, width, length);

        selectionState = new PlayerSelectionState(this, cameraMovement);
        buildingSingleStructureState = new PlayerBuildingSingleStructureState(this, placementManager, grid);

        state = selectionState;
    }
    private void Awake()
    {
        buildingManager           = new BuildingManager(placementManager, cellSize, width, length);
        removeState               = new PlayerRemoveBuildingState(this, buildingManager);
        selectionState            = new PlayerSelectionState(this, cameraMover);
        buildSingleStructureState = new PlayerBuildingSingleStructureState(this, buildingManager);
        state = selectionState;
#if (UNITY_EDITOR && TEST) || !(UNITY_IOS || UNITY_ANDROID)
        inputManager = this.gameObject.AddComponent <InputManager>();
#endif
#if (UNITY_IOS || UNITY_ANDROID)
        inputManager = this.gameObject.AddComponent <InputManager>();
#endif
    }
示例#3
0
    private void Awake()
    {
        _buildingManager = new BuildingManager(_cellSize, _width, _length, _placementManager);

        selectionState = new PlayerSelectionState(this, _cameraMovement);
        buildingSingleStructureState = new PlayerBuildingSingleStructureState(this, _buildingManager);
        demolishState = new PlayerRemoveBuildingState(this, _buildingManager);

        _state = selectionState;

#if (UNITY_EDITOR && TEST) //&& !(UNITY_IOS || UNITY_ANDROID)
        _inputManager = gameObject.AddComponent <InputManager>();
#endif
    }