private void Awake() { cameraController = FindObjectOfType <CameraController>(); sliderWindow = FindObjectOfType <SliderWindow>(); grid = FindObjectOfType <GridCreator>(); pointer.Deactivate(); }
private void Awake() { grid = FindObjectOfType<GridCreator>(); widthField.onValueChanged.AddListener((text) => OnChange(text, true)); heightField.onValueChanged.AddListener((text) => OnChange(text, false)); UpdateLabel(); }
public SaveData(Player currentPlayer, bool isFirstStage, List <Player> players, GridCreator gridCreator) { Width = gridCreator.Width; Height = gridCreator.Height; IsFirstStage = isFirstStage; CurrentPlayerIndex = currentPlayer.Index; Players = players.ToArray(); Tiles = new TileData[Width * Height]; for (int y = 0; y < Height; y++) { for (int x = 0; x < Width; x++) { int index = y * Width + x; Tiles[index] = gridCreator.Grid[x, y].Data; } } }
private void Awake() { m_MovesManager = FindObjectOfType <MovesManager>(); m_Grid = FindObjectOfType <GridCreator>(); }