public Image this[BoardSelection selection] { get { switch (selection) { case BoardSelection.ME: return(ME_Image); case BoardSelection.SELECT: return(Select_Image); case BoardSelection.ENEMY: return(Enemy_Image); } throw new ArgumentException("Данный тип выделения не имеет изображения!", "figure"); } set { switch (selection) { case BoardSelection.ME: ME_Image = value; break; case BoardSelection.SELECT: Select_Image = value; break; case BoardSelection.ENEMY: Enemy_Image = value; break; } throw new ArgumentException("Данный тип выделения не имеет изображения!", "figure"); } }
private void Start() { roundController = GameController.instance.roundController; actionController = GameController.instance.actionController; gameController = GetComponent <GameController>(); boardSelection = GetComponent <BoardSelection>(); }
void Start() { gameController = GameController.instance; boardSelection = GetComponent <BoardSelection>(); cursorInput = GetComponent <CursorInput>(); pathInput = GetComponent <PathInput>(); }
// Start is called before the first frame update void Start() { BoardSelectionObject = this;//refers to the gameObject to whom this script is attatched to. In this case, the plane white tile we had. createActualBoard(); }