Beispiel #1
0
 /// <param name="InitialPosition">The player's Initial Position</param>
 /// <param name="InitialRotation">The player's Initial Rotation</param>
 /// <param name="BoundingBoxSize">The Height, Width and Depth of the player</param>
 public Player(Vector3 InitialPosition, float InitialRotation, Vector3 BoundingBoxSize, World world)
 {
     this.world = world;
     this.position = InitialPosition;
     this.rotation = InitialRotation;
     this.boundingBoxSize = BoundingBoxSize;
 }
Beispiel #2
0
        /// <summary>
        /// Allows the game component to perform any initialization it needs to before starting
        /// to run.  This is where it can query for any required services and load content.
        /// </summary>
        public void Initialize(ModelTypes.PlayerType playerType, Vector3 initialPosition, float initialRotation, Vector3 boundingBoxSize, EGGEngine.Physics.World world, Weapon currentWeapon)
        {
            this.playerType = playerType;
            this.position   = initialPosition;
            this.rotation   = initialRotation;
            this.health     = ModelTypes.PlayerHealth[(int)playerType];
            this.maxHealth  = this.health;
            this.shield     = ModelTypes.ShieldHealth[(int)playerType];
            this.maxShield  = this.shield;

            this.model = Game.Content.Load <Model>(ModelTypes.PlayerModelFileName[(int)playerType]);


            physicsPlayer = new EGGEngine.Physics.Player(this.position, this.rotation, boundingBoxSize, world);
            // TODO: Add your initialization code here
            base.Initialize();
        }