This commit is contained in:
brausjonas
2023-02-26 21:37:11 +01:00
parent 1b34f885b3
commit 63ed43576c
34 changed files with 3708 additions and 355 deletions
+45
View File
@@ -0,0 +1,45 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Star : MonoBehaviour
{
private bool isActive;
private StarController starController;
private int cost = 20;
[SerializeField] private GameObject starObject;
public int Cost
{
get
{
return cost;
}
}
public bool IsActive
{
get
{
return isActive;
}
set
{
isActive = value;
starObject.SetActive(value);
}
}
public void init(StarController starController)
{
this.starController = starController;
}
public void Buy(Player player)
{
player.coins -= cost;
starController.SwitchStar();
}
}