void Awake() { //Store an Instance of itself Instance = this; speedLimits = new Dictionary<Animation_Manager.MotionStateList, float>(); //Create variables for your different speeds speedLimits.Add(Animation_Manager.MotionStateList.Backward, 5f); speedLimits.Add(Animation_Manager.MotionStateList.Forward, 10f); speedLimits.Add(Animation_Manager.MotionStateList.Left, 8f); speedLimits.Add(Animation_Manager.MotionStateList.Right, 8f); speedLimits.Add(Animation_Manager.MotionStateList.RightForward, 9f); speedLimits.Add(Animation_Manager.MotionStateList.LeftForward, 9f); speedLimits.Add(Animation_Manager.MotionStateList.RightBackward, 4f); speedLimits.Add(Animation_Manager.MotionStateList.LeftBackward, 4f); speedLimits.Add(Animation_Manager.MotionStateList.Stationary, 0f); }
private void Start() { character_Motor = GetComponent <Character_Motor>(); character_Manager = GetComponent <Character_Manager>(); }
// Use this for initialization private void Awake() { Instance = this; }