using System.Collections; using System.Collections.Generic; using UnityEngine; public class Upgrade { public string name = "MT"; public int amount = 0; public Upgrade(string n) { name = n; } } public class Upgrades { public Upgrade mopUpgrade = new Upgrade("Mop Radius"); public Upgrade speedUpgrade = new Upgrade("Move speed"); public Upgrade ropeUpgrade = new Upgrade("Longer Rope"); public Upgrade healthUpgrade = new Upgrade("More health"); public Upgrade damageUpgrade = new Upgrade("More rope damage"); public Upgrade bloodUpgrade = new Upgrade("MORE BLOOD!"); public Upgrade reelUpgrade = new Upgrade("Faster rope reel speed"); } public class Upgrader : MonoBehaviour { public GameObject player1; public GameObject player2; public BloodComputeShader bloodManager; public RopeSimulator rope; public Upgrades upgrades { get; private set; } // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { } /// Increases mop radius by 10% public void UpgradeMopSize() { bloodManager.CleanRadius *= 1.1f; } /// Increases move speed by 10% public void UpgradeSpeed() { player1.GetComponent().moveSpeed *= 1.1f; player2.GetComponent().moveSpeed *= 1.1f; } public void RopeUpgrade() { // todo: public methods } // public void }