From b2e26ce8d2dc94ee6a668c9d0fcc099ac3041dd6 Mon Sep 17 00:00:00 2001 From: SpoodyTheOne Date: Sat, 3 Feb 2024 16:22:10 +0100 Subject: [PATCH] upegurador! --- Assets/Scripts/Upgrader.cs | 67 +++++++++++++++++++++++++++++++++ Assets/Scripts/Upgrader.cs.meta | 11 ++++++ 2 files changed, 78 insertions(+) create mode 100644 Assets/Scripts/Upgrader.cs create mode 100644 Assets/Scripts/Upgrader.cs.meta diff --git a/Assets/Scripts/Upgrader.cs b/Assets/Scripts/Upgrader.cs new file mode 100644 index 0000000..306d81c --- /dev/null +++ b/Assets/Scripts/Upgrader.cs @@ -0,0 +1,67 @@ +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 + +} diff --git a/Assets/Scripts/Upgrader.cs.meta b/Assets/Scripts/Upgrader.cs.meta new file mode 100644 index 0000000..590a888 --- /dev/null +++ b/Assets/Scripts/Upgrader.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 723cbd9d3229f69d79e38cebc5eabf45 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: