Beispiel #1
0
 /// <summary>
 /// Constructor for use when parrying.
 /// </summary>
 /// <param name="destinationParry">The intended parry.</param>
 /// <param name="opponent">The opponent.</param>
 public AdoptStanceTask(OpponentStances.Parries destinationParry, Person opponent)
 {
     this.destinationParry = destinationParry;
     this.opponent         = opponent;
     moveFunction          = new movementFunction(MoveToParry);
     rotFunction           = new rotationFunction(RotateToParry);
     doneFunction          = new endFunction(CheckParryComplete);
     regFunction           = new registerFunction(ParryRegister);
 }
Beispiel #2
0
        private readonly float angleTolerance = 1.0f; //in degrees



        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="destinationStance">The stance the opponent intends to achieve.</param>
        /// <param name="opponent">The opponent.</param>
        public AdoptStanceTask(OpponentStances.Stances destinationStance, Person opponent)
        {
            this.destinationStance = destinationStance;
            this.opponent          = opponent;
            moveFunction           = new movementFunction(MoveToStance);
            rotFunction            = new rotationFunction(RotateToStance);
            doneFunction           = new endFunction(CheckStanceTolerances);
            regFunction            = new registerFunction(StanceRegister);
        }