public cPickupAble(cGameScene scene, cSpatialGrid grid, Vector2f pos, Vector2f emit_direction) : base(scene, pos) { this.grid = grid; this.pickedUp = pulling = false; this.heading = emit_direction; this.bounds = new cAABB(); this.bounds.SetDims(new Vector2f(16.0f, 22.0f)); this.bounds.SetPosByCenter(pos); this.HitCollisionRect = bounds; this.MaxSpeed = EMIT_SPEED * 2; this.mass = 100.0f; this.velocity.X = this.heading.X * EMIT_SPEED; this.velocity.Y = this.heading.Y * EMIT_SPEED; orientation = cAppMath.GetAngleOfVector(heading); this.sprite = new Sprite(cAssetManager.GetTexture("pickups")); pickup = PickupEffects.getWeighted(); //.get(PickupType.HEALTH); this.sprite.TextureRect = pickup.TextureRect; //this.sprite.Scale = new Vector2f(0.5f, 0.5f); //this.sprite.Rotation = (float)cAppMath.RadianToDegress(this.orientation); this.sprite.Origin = new Vector2f(12.0f, 12.0f); }
public cPlayer(cGameScene scene, Vector2f pos) : base(scene, pos) { p_followLight = new cLight(); p_followLight.Radius = 80.0f; p_followLight.LinearizeFactor = 0.9f; p_followLight.Color = new Color(240, 219, 164); this.Scene.LightMap.AddStaticLight(p_followLight); this.weapon = new cShotgun(this, Constants.DEFAULT_WEAPON_FIRING_FREQUENCY); // 9 healthText = new Text("", cAssetManager.GetFont("pf_tempesta_seven")); healthText.Position = new Vector2f(pscene.AppController.MainWindow.DefaultView.Size.X - 500, 30); healthText.CharacterSize = 28; // in pixels, not points! healthText.Color = Color.White; healthText.Style = Text.Styles.Bold; }
public cGameObject(cGameScene scene, Vector2f pos) : base() { pscene = scene; position = pos; lastPosition = pos; viewPosition = pos; velocity = new Vector2f(0.0f, 0.0f); acceleration = new Vector2f(0.0f, 0.0f); force = new Vector2f(0.0f, 0.0f); orientation = 0.0; mass = 1.0f; movAble = true; hitCollisionRect = new cAABB(); m_ID = GetNextValidID(); }
public cGameObject() : base() { pscene = null; position = new Vector2f(0.0f, 0.0f);; lastPosition = new Vector2f(0.0f, 0.0f);; viewPosition = new Vector2f(0.0f, 0.0f);; velocity = new Vector2f(0.0f, 0.0f); acceleration = new Vector2f(0.0f, 0.0f); force = new Vector2f(0.0f, 0.0f); MaxSpeed = 0.0f; SlowDown = 1.0f; orientation = 0.0; mass = 1.0f; movAble = true; hitCollisionRect = new cAABB(); m_ID = GetNextValidID(); }
public cParticleManager(cGameScene scene) { this.scene = scene; explosionTexture = cAssetManager.GetTexture("simple_particle"); fireworksTexture = cAssetManager.GetTexture("bullet_light_green"); explosions = new cExplosionController(this); fireworks = new cFireworksController(this); label = new Text(); label.Position = new Vector2f(20, 45); label.Font = cAssetManager.GetFont("BGOTHL"); label.CharacterSize = 24; label.Color = Color.White; label.Style = Text.Styles.Bold; }
public cMonster(cGameScene scene, Vector2f pos) : base(scene, pos) { p_followLight = new cLight(); p_followLight.Radius = 80.0f; p_followLight.LinearizeFactor = 0.9f; p_followLight.Bleed = 2.0f; p_followLight.Color = new Color(20, 184, 87); //this.Scene.LightMap.AddStaticLight(p_followLight); eye = new cLight(); eye.Radius = 10.0f; eye.LinearizeFactor = 0.98f; eye.Bleed = 5.0f; eye.OriginalColor = new Color(255, 39, 13); eye.Color = new Color(255, 39, 13); this.Scene.LightMap.AddStaticLight(eye); locateTime = new cTimer(); }
public comLittleBloodExplosion(cGameScene scene, Vector2f pos) : base(scene) { this.pos = pos; }
public comNormalBloodExplosion(cGameScene scene, cEmissionInfo emission) : base(scene) { this.emission = emission; }
public cBaseGameCommand(cGameScene scene) { this.scene = scene; }
public cCharacter(cGameScene scene, Vector2f pos) : base(scene, pos) { spriteControl = new cSpriteStateController(); initSprites(); init(); }
public comPlacePickup(cGameScene scene, cPickupAble item) : base(scene) { this.item = item; }
public comNormalFireworks(cGameScene scene, Vector2f pos) : base(scene) { this.pos = pos; }