This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Damageable : MonoBehaviour | |
{ | |
public FadeOutTextTween DamagePrefab; | |
public string NumberFormat = "N0"; | |
// for your game, probably don't need this piece. It should instead be damage from the attacking object | |
private RangeInt DamageRange = new RangeInt(10, 20_000); | |
private ObjectPool DamageTextPool; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AutoDestroyPoolableObject : PoolableObject | |
{ | |
public float AutoDestroyTime = 5f; | |
private const string DisableMethodName = "Disable"; | |
public virtual void OnEnable() | |
{ | |
CancelInvoke(DisableMethodName); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using TMPro; | |
using UnityEngine; | |
[RequireComponent(typeof(TextMeshProUGUI))] | |
public class BuildDisplayer : MonoBehaviour | |
{ | |
private TextMeshProUGUI Text; | |
private void Awake() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using UnityEngine; | |
using UnityEngine.UI; | |
[RequireComponent(typeof(Image))] | |
public class FadeAlpha : MonoBehaviour | |
{ | |
public bool UseRealtimeWait = false; | |
private Image Image; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using TMPro; | |
using UnityEngine; | |
[RequireComponent(typeof(TextMeshProUGUI))] | |
public class NumberCounter : MonoBehaviour | |
{ | |
public TextMeshProUGUI Text; | |
public int CountFPS = 30; | |
public float Duration = 1f; |