public Player( GamerEntity owner, string entityName, Vector3 position, float orientation) : base("characters", entityName, position, orientation, Color.White, 0) { this.owner = owner; entityState = tEntityState.Active; setCollisions(); // life stuff initializeLifeStuff(); // actions stuff fastShotCooldownTime = 0.0f; dashCooldownTime = 0.0f; dashVelocity = Vector2.Zero; dashParticleTimer = 0.0f; bigShotChargeTimer = 0.0f; bigShotCharging = false; bigShotCooldownTime = 0.0f; mode = tMode.Arcade; if (bigShotBall == null) bigShotBall = TextureManager.Instance.getTexture("projectiles/bigShotPlayer"); if (starXP == null) starXP = TextureManager.Instance.getTexture("GUI/menu/starXP"); if (garlicGunTexture == null) garlicGunTexture = TextureManager.Instance.getTexture("characters/garlicGun"); if (garlicGunBandTexture == null) garlicGunBandTexture = TextureManager.Instance.getTexture("characters/garlicGunBand"); if (wishLife == null) wishLife = TextureManager.Instance.getTexture("GUI/ingame/wishLife"); if (wishLifePortion == null) wishLifePortion = TextureManager.Instance.getTexture("GUI/ingame/wishLifePortion"); if (wishLifePortionEmpty == null) wishLifePortionEmpty = TextureManager.Instance.getTexture("GUI/ingame/wishLifePortionEmpty"); }
public static GamerEntity createGamerEntity(PlayerIndex playerIndex, bool sessionOwner) { GamerEntity ge = new GamerEntity(sessionOwner); if (Gamer.SignedInGamers[playerIndex] != null) { ge.Gamer = Gamer.SignedInGamers[playerIndex]; } gamerEntities.Add(ge); createPlayer(ge); ge.Controls = ControlPadManager.Instance.controlPads[(int)playerIndex]; ge.PlayerIndex = playerIndex; playerEntities.Add(ge.Player); return ge; }
public XPCounter(GamerEntity player, string textureName, Vector2 position, Vector2 scale) : base(textureName, position, scale, false) { this.player = player; }
public static void createPlayer(GamerEntity ge) { ge.Player = new Player(ge, "player", Vector3.Zero, 0); }