Liberi
An exergame built for kids with CP!
AlternateSprite.cs
1 using UnityEngine;
2 
7 [System.Serializable]
8 public class AlternateSprite
9 {
10  public Sprite AltSprite;
11  public SpriteRenderer[] TargetRenderers;
12 
13  public void Activate ()
14  {
15  for (int i = 0; i < TargetRenderers.Length; i++)
16  TargetRenderers[i].sprite = AltSprite;
17  }
18 }
Stores a Sprite and Target Sprite Renderer. When activated, it changes the Target Sprite Renderer's c...