Beispiel #1
0
    public void CreateFoodShop()
    {
        if (income.cash >= priceFood)
        {
            income.DeductCash(priceFood);
            GameObject prefab = (GameObject)Instantiate(foodPrefab, Vector3.zero, Quaternion.identity);
            sceneObject.allObjects.Add(prefab);
            sceneObject.hungerObjects.Add(prefab);

            prefab.transform.position = new Vector3(0, 0, 0);
            selectedObject            = prefab;
        }
    }