예제 #1
0
    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);
    }
예제 #2
0
 private void Start()
 {
     character_Motor   = GetComponent <Character_Motor>();
     character_Manager = GetComponent <Character_Manager>();
 }
 // Use this for initialization
 private void Awake()
 {
     Instance = this;
 }