Пример #1
0
        /// <summary>
        /// Calculates angles and such between a target point for the enemy
        /// </summary>
        /// <param name="target"> Target position </param>
        void setTargetPosition(Vector2 target)
        {
            walkAngle = angleBetween(target, position);

            velocity = Vector2Extensions.FromAngle(walkAngle);

            setWalkAngle(walkAngle + MathHelper.PiOver2);
        }