Exemplo n.º 1
0
    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);
    }
Exemplo n.º 2
0
    public override InteractiveElement GetCurrentFoodElement()
    {
        InteractiveElement food;

        if (foodList.Count == 0)
        {
            food = SimpleInteractiveElementFactory.CreateElement("FoodElement");
            foodList.Add(food);
        }
        return(foodList[0]);
    }
Exemplo n.º 3
0
 InteractiveElement CreateSnakesBodyElement(Vector3Int position)
 {
     return(SimpleInteractiveElementFactory.CreateElement("SnakesBodyElement", position));
 }