public Menu() : base() { hoverCursor = Content.GetTexture("cursorHover.png"); defaultCursor = Content.GetTexture("cursorPointer.png"); currentCursor = defaultCursor; char1 = new Animation(Content.GetTexture("idle.png"), 4, 0, 0, true); char2 = new Animation(Content.GetTexture("char2_idle.png"), 4, 0, 0, true); shader = new RenderStates(new Shader(null, "Content/bgPrlx.frag")); rectConnect = new RectangleShape() { Size = new Vector2f(150, 30), Position = new Vector2f(-25, 70) }; rectIP = new RectangleShape() { Size = new Vector2f(150, 20), Position = new Vector2f(-25, 40) }; rectUsername = new RectangleShape() { Size = new Vector2f(150, 20), Position = new Vector2f(-25, 10) }; MainGame.window.TextEntered += TextEnteredEvent; }
public ClientPlayer(Deathmatch dm) : base(dm) { this.model = MainGame.Char2Model; Pos = new Vector2f(10, 10); Speed = 2f; MaxJumps = 2; JumpsLeft = MaxJumps; Alive = true; Health = 100; Texture = Content.GetTexture(model.idleFile); deathTimer = 0; Killer = this; idle = new Animation(Content.GetTexture(model.idleFile), 4, 120, 1); running = new Animation(Content.GetTexture(model.runFile), 6, 60, 2); backpedal = new Animation(Content.GetTexture(model.runFile), 6, 60, 2, false); jumpUp = new Animation(Content.GetTexture(model.jumpUpFile), 1, 60, 0); jumpDown = new Animation(Content.GetTexture(model.jumpDownFile), 3, 60, -5); animation = idle; weapons = new List<Weapon>() { new Revolver(this), null, null, null, }; respawnTimer = respawnLength * 60; weapon = weapons[0]; }
public Explosion(Vector2f center, Actor Owner, bool damaged = false) { if (Owner != null) this.Owner = Owner; this.damaged = damaged; this.Pos = center; animation = new Animation(Content.GetTexture("explosion.png"), 6, 30, 0); }
public TrainDust(Vector2f pos, float Rotation, float scale = 1) : base() { this.scale = scale; this.Pos = pos; this.Rot = Rotation; animation = new Animation(Content.GetTexture("gunSmoke.png"), 5, 25, 0); }
public GunFlash(Vector2f pos, float Rotation) : base() { this.Alpha = .8f; this.Pos = pos; this.Rot = Rotation; animation = new Animation(Content.GetTexture("bulletFlash.png"), 5, 15, 0); }
public GunSmoke(Vector2f pos, float Rotation) : base() { this.Alpha = .8f; this.Pos = pos; this.Rot = Rotation; animation = new Animation(Content.GetTexture("gunSmoke.png"), 5, 20, 0); }
public NetPlayer(Deathmatch dm, long UID) : base(dm) { model = MainGame.Char1Model; this.UID = UID; idle = new Animation(Content.GetTexture(model.idleFile), 4, 120, 1); running = new Animation(Content.GetTexture(model.runFile), 6, 60, 2); backpedal = new Animation(Content.GetTexture(model.runFile), 6, 60, 2, false); jumpUp = new Animation(Content.GetTexture(model.jumpUpFile), 1, 60, 0); jumpDown = new Animation(Content.GetTexture(model.jumpDownFile), 3, 60, -5); animation = idle; Texture = Content.GetTexture("idle.png"); Alive = true; //.Color = Color.Red; weapons = new List<Weapon>() { new Revolver(this), new Shotgun(this), new MachineGun(this), new BombWeapon(this), }; }
public void UpdateToCurrentModel() { idle = new Animation(Content.GetTexture(model.idleFile), 4, 120, 1); running = new Animation(Content.GetTexture(model.runFile), 6, 60, 2); backpedal = new Animation(Content.GetTexture(model.runFile), 6, 60, 2, false); jumpUp = new Animation(Content.GetTexture(model.jumpUpFile), 1, 60, 0); jumpDown = new Animation(Content.GetTexture(model.jumpDownFile), 3, 60, -5); }
public BulletDestroy(Vector2f pos) : base() { this.Pos = pos; animation = new Animation(Content.GetTexture("bulletDestroy.png"), 4, 10, 0); }