protected void FillPosition(int x, int y, string wallName) { InteractiveElement obstacle = SimpleInteractiveElementFactory.CreateElement(wallName); obstacle.position = new Vector3Int(x, y, 0); gameField.Add(obstacle.position, obstacle); }
public override InteractiveElement GetCurrentFoodElement() { InteractiveElement food; if (foodList.Count == 0) { food = SimpleInteractiveElementFactory.CreateElement("FoodElement"); foodList.Add(food); } return(foodList[0]); }
InteractiveElement CreateSnakesBodyElement(Vector3Int position) { return(SimpleInteractiveElementFactory.CreateElement("SnakesBodyElement", position)); }