/// <summary> /// Used for initialization /// </summary> private void Awake() { mCamera = GameObject.FindWithTag("MainCamera"); if (mCamera != null && mCamera.transform.parent != null) { mCameraRig = mCamera.transform.parent.gameObject.GetComponent<FollowRig>(); } if (GameObject.Find("Actor Text") != null) { mActorText = GameObject.Find("Actor Text").GetComponent<Text>(); } mActorDescriptions = new Dictionary<string, string>(); mActorDescriptions.Add("Player Capsule", "Standard capsule settings that collides with objects and slides on slopes."); mActorDescriptions.Add("Player Sphere", "'Roller Ball' settings that collides with objects. Sphere based object that slides on slopes."); mActorDescriptions.Add("Player Ghost", "Ghost settings that goes through objects. He'll rise up on surfaces if possible."); mActorDescriptions.Add("Player Robot", "Standard character settings that collide with objects and slides on slopes. Does not have foot collisions for smooth stepping."); mActorDescriptions.Add("Player Spider", "Wall walker settings that collides with objects. Walk up to a wall and 'jump' to jump onto it."); }
/// <summary> /// Called when the object is selected in the editor /// </summary> private void OnEnable() { // Grab the serialized objects mTarget = (FollowRig)target; mTargetSO = new SerializedObject(target); }