Hi guys, I have a game with several states, and I need to store a PreviusState before I change the CurrentState. I'd like to know if there's a way to do that without manually assigning values. Here's the code I wrote in case it's confusing:
How to store a value before it's changed?
Code (CSharp):
- using UnityEngine;
- using System.Collections;
- {
- public static float score = 0;
- //============================================
- //Declare public variables.
- public float minX = -5.5f;...