/* * author: ryan lin * date: 15/8/2024 * description: script to handle coffee power up behaviour */ public class CoffeePowerUp : CommonInteractable { /// /// how much to increase the player's speed by in m/2 /// public float speedBoost; /// /// the interaction prompt for the player /// public string InteractionPrompt => "Press [E] to drink coffee"; /// /// to call the add speed function from the game manager /// public override void Interact() { GameManager.Instance.AddSpeed(speedBoost); Destroy(gameObject); } }