// Use this for initialization void Start() { playerBoosterTiles = PlayerBoosterTiles.instance; playerBoosterTiles.AddDamageBoosterAmountListener(UpdateLabel); damageBoosterAmountLabel = GetComponent<Text>(); UpdateLabel(playerBoosterTiles.CurrentDamageBoosterAmount); }
protected void Start() { playerBoostertiles = PlayerBoosterTiles.instance; coloredByCurrentDamageType = GetComponent<ColoredByCurrentDamageType>(); Image img = GetComponent<Image>(); if (img != null) { image = img; } else { text = GetComponent<Text>(); } SaveInitialColor(); }
void Awake() { instance = this; rangeBoosterAmountListeners = new List<OnAmountChange>(); damageBoosterAmountListeners = new List<OnAmountChange>(); }
void Start() { map = Map.instance; playerBoosterTiles = PlayerBoosterTiles.instance; gameObject.AddComponent<BoxCollider2D>(); BoxCollider2D collider = GetComponent<BoxCollider2D>(); collider.size = new Vector2(140f, 140f); }