public cMonster(GameScene scene, Vector2f pos) : base(scene, pos) { p_followLight = new cLight(); p_followLight.Pos = this.Bounds.center; p_followLight.Radius = 100.0f; p_followLight.LinearizeFactor = 0.4f; p_followLight.Bleed = 2.0f; p_followLight.OriginalColor = new Color(239, 129, 37); p_followLight.Color = new Color(239, 129, 37); // 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); this.sleep(); bloom = new Sprite(Scene.Assets.GetTexture("bloom")); bloom.Scale = new Vector2f(0.2f, 0.2f); bloom.Origin = new Vector2f(bloom.Texture.Size.X / 2.0f, bloom.Texture.Size.Y / 2.0f); bloom.Color = Color.Red; this.attacking = false; this.attackCharger = new cRegulator(); this.attackCharger.resetByFrequency(2); this.boundingRadius = 12.0f; }
public cPlayer(GameScene scene, Vector2f pos) : base(scene, pos) { fireLight = new cLight(); fireLight.Pos = this.Bounds.center; fireLight.Bleed = 10.0f; fireLight.Radius = 120.0f; fireLight.LinearizeFactor = 0.96f; fireLight.OriginalColor = new Color(136, 216, 176); fireLight.Color = new Color(136, 216, 176); fireLight.TurnOff(); this.Scene.LightMap.AddStaticLight(fireLight); p_followLight = new cLight(); p_followLight.Pos = this.Bounds.center; p_followLight.Radius = 160.0f; p_followLight.LinearizeFactor = 0.9f; p_followLight.OriginalColor = new Color(240, 219, 164); p_followLight.Color = new Color(240, 219, 164); // p_followLight.TurnOff(); this.Scene.LightMap.AddStaticLight(p_followLight); this.weapon = // new cMachineGun(this, Constants.DEFAULT_WEAPON_FIRING_FREQUENCY); new cShotgun(this, Constants.DEFAULT_WEAPON_FIRING_FREQUENCY); // 9 this.health = 50; healthText = new Text("", Scene.Assets.GetFont("pf_tempesta_seven")); healthText.Position = new Vector2f(pscene.AppController.MainWindow.DefaultView.Size.X - 500, 30); healthText.CharacterSize = 28; // in pixels, not points! healthText.FillColor = Color.White; healthText.Style = Text.Styles.Bold; this.boundingRadius = 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 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 cTurret(GameScene scene, Vector2f pos) : base(scene, pos) { this.Bounds.SetDims(new Vector2f(16, 16)); this.Bounds.SetPosByCenter(pos); gun = new cMachineGun(this, 6, "turret-bullet"); gunFacingDirection = new Vector2f(0.0f, -1.0f); shape = new RectangleShape(new Vector2f(Bounds.dims.X, Bounds.dims.Y)); shape.Origin = new Vector2f(Bounds.halfDims.X, Bounds.halfDims.Y); shape.FillColor = Color.Green; shape.Position = new Vector2f(pos.X, pos.Y); shape.Scale = new Vector2f(1.0f, 1.0f); light = new cLight(); light.Pos = this.Bounds.center; light.Radius = 100.0f; light.LinearizeFactor = 0.8f; light.Bleed = 8.0f; light.Color = new Color(20, 184, 87); this.Scene.LightMap.AddStaticLight(light); }