void Start()
 {
     state = new InputControlGroup();
     agent.autoTraverseOffMeshLink = false;
     agent.updateRotation          = false;
     standardCharacterModel        = agent.GetComponent <StandardCharacterModel> ();
     jumpDuration = standardCharacterModel.jumpDuration;
 }
示例#2
0
		/// <summary>
		/// Properties belonging to the standard character model only
		/// </summary>
		void StandardModelProperties ()
		{
			StandardCharacterModel standardModel = Model as StandardCharacterModel;
			StandardJump standardJump = CreateBehavior<StandardJump> () as StandardJump;

			StandardMovement movement = CreateBehavior<StandardMovement> () as StandardMovement;
			movement.CanMoveOnXAxis = true;
			movement.CanMoveOnYAxis = false;
			movement.SpeedLimitX = standardModel.jumpSpeedLimitX;
		}
示例#3
0
		/// <summary>
		/// Alternate functionality of this state. Only with a jump and no movement. This is just an example
		/// </summary>
		void AlternateModelProperties ()
		{
			StandardCharacterModel standardModel = Model as StandardCharacterModel;

			AlternateJump alternateJump =	CreateBehavior<AlternateJump> () as AlternateJump;
		}