public ImStuffHat(float x, float y) : base(x, y) { PlayingBinding = new StateBinding("Playing"); _sprite = new SpriteMap(DuckUtils.GetAsset("hats/imstuff.png"), 129, 153); sound = SFX.Get(DuckUtils.GetAsset("sounds/imstuff.wav"), 1f, 0f, 0f, false); }
public MP5Imbalance(float xval, float yval) : base(xval, yval) { ammo = MaxAmmo; _ammoType = new ATMissile(); _ammoType.penetration = 2f; _ammoType.range = 200f; _ammoType.accuracy = 1f; _type = "gun"; _editorName = "MP5"; graphic = new SpriteMap(DuckUtils.GetAsset("weapons/mp5_imba.png"), 24, 14); center = new Vec2(8f, 4f); collisionOffset = new Vec2(-8f, -4f); collisionSize = new Vec2(20f, 10f); _barrelOffsetTL = new Vec2(23f, 5f); _fireSound = DuckUtils.GetAsset("sounds/mp5_imba_shot.wav"); _fullAuto = true; _fireWait = 0f; _kickForce = 0.4f; _holdOffset = new Vec2(-5f, -3f); storeSound = new NetSoundEffect(DuckUtils.GetAsset("sounds/mp5_imba_store.wav")); SoundBinding = new NetSoundBinding("storeSound"); }
public DubstepGun(float xval, float yval) : base(xval, yval) { PlayBinding = new StateBinding("Playing"); _bio = "Plays generic dubstep loop and destroys everything"; _editorName = "Dubstep Gun"; ammo = LoopTimings.Length + Rando.Int(-5, 5); _ammoType = new ATGrenade(); _type = "gun"; sprite = new SpriteMap(DuckUtils.GetAsset("weapons/dubstep_gun.png"), 16, 16); sprite.AddAnimation("anim", Maths.IncFrameTimer() * 4f, true, 0, 1, 2, 3); sprite.SetAnimation("anim"); graphic = sprite; center = new Vec2(8f, 10f); sound = SFX.Get(DuckUtils.GetAsset("sounds/dubstep_sample.wav"), 1f, 0f, 0f, false); collisionOffset = new Vec2(-8f, -6f); collisionSize = new Vec2(16f, 11f); _barrelOffsetTL = new Vec2(16f, 6f); _fireSound = "pistolFire"; _kickForce = 3f; _holdOffset = new Vec2(-1f, 0f); loseAccuracy = 0.1f; maxAccuracyLost = 1f; physicsMaterial = PhysicsMaterial.Metal; }
private void Explode() { Explosion.Create(this, position); Level.Remove(this); SFX.Play(DuckUtils.GetAsset("sounds/vote_end.wav")); Playing = false; }
public override void Fire() { if (ammo > 0) { SFX.Play(DuckUtils.GetAsset("sounds/fututre_gan.wav")); Vec2 vec = Offset(barrelOffset); if (isServerForObject) { FututreSphere sphere = new FututreSphere(vec.x, vec.y, owner, barrelVector); Fondle(sphere); sphere.killThingType = GetType(); Level.Add(sphere); if (owner != null) { owner.hSpeed = -barrelVector.x * 8f; owner.vSpeed = -barrelVector.y * 4f - 2f; } else { hSpeed = -barrelVector.x * 8f; vSpeed = -barrelVector.y * 4f - 2f; } } ammo--; } }
public SatanicBrekotkinHat(float x, float y) : base(x, y) { PlayingBinding = new StateBinding("Playing"); graphic = _pickupSprite = _sprite = new SpriteMap(DuckUtils.GetAsset("hats/brekotkin_satanic.png"), 32, 32); _editorName = "Satanic Brekotkin Hat"; sound = SFX.Get(DuckUtils.GetAsset("sounds/umri.wav"), 1f, 0f, 0f, false); }
public BrekotkinHat(float x, float y) : base(x, y) { PlayingBinding = new StateBinding("Playing"); graphic = _pickupSprite = _sprite = new SpriteMap(DuckUtils.GetAsset("hats/brekotkin.png"), 32, 32); _editorName = "Brekotkin Hat"; sound = SFX.Get(DuckUtils.GetAsset("sounds/disco_ebalo.wav"), 1f, 0f, 0f, true); }
public FututreSphere(float xval, float yval, Thing owner, Vec2 velocity) : base(xval, yval) { PositionBinding = new CompressedVec2Binding("position", 2147483647, isvelocity: false, doLerp: true); VelocityBinding = new CompressedVec2Binding("travel", 1); sprite = new Sprite(DuckUtils.GetAsset("part/fututre_beam.png")); radius = 10f; depth = 0.5f; travel = velocity; this.owner = owner; }
public TimeFreezeGrenade(float x, float y) : base(x, y) { _editorName = "Freeze Grenade"; _bio = "Whoosh!"; Timer = 2f; graphic = new SpriteMap(DuckUtils.GetAsset("weapons/timefreeze_grenade.png"), 16, 16); center = new Vec2(8f, 8f); collisionOffset = new Vec2(-3f, -6f); collisionSize = new Vec2(7f, 13f); bouncy = 0.5f; friction = 0.04f; }
public FrogGrenade(float x, float y) : base(x, y) { _editorName = "Frog Grenade"; _bio = "Ribbit!"; graphic = new SpriteMap(DuckUtils.GetAsset("weapons/frog_grenade.png"), 16, 16); center = new Vec2(8f, 8f); collisionOffset = new Vec2(-6f, -5f); collisionSize = new Vec2(12f, 12f); bouncy = 0.4f; friction = 0.07f; Timer = 2f; }
public OniichanGrenade(float x, float y) : base(x, y) { _editorName = "Onii-chan Grenade"; _bio = "Onii-chan~ onii-chan~~"; Timer = SecondExplosion; graphic = new SpriteMap(DuckUtils.GetAsset("weapons/oniichan_grenade.png"), 16, 16); center = new Vec2(8f, 8f); collisionOffset = new Vec2(-3f, -6f); collisionSize = new Vec2(7f, 13f); bouncy = 0.5f; friction = 0.04f; }
public override void Fire() { SFX.Play(DuckUtils.GetAsset("sounds/pop.wav")); Vec2 barrel = Offset(barrelOffset); float radians = barrelAngle + Rando.Float(-0.1f, 0.1f); Vec2 velocity = Maths.AngleToVec(radians) * 10f; Frog frog = new Frog(barrel.x, barrel.y, velocity.x > 0); Fondle(frog); frog.hSpeed = velocity.x; frog.vSpeed = velocity.y; Level.Add(frog); }
public override void Update() { base.Update(); if (!wasSoundPlayed && !HasPin) { wasSoundPlayed = true; //play sound SFX.Play(DuckUtils.GetAsset("sounds/oniichan.wav"), 1f, 0f, 0f, false); } float timePassed = SecondExplosion - Timer; if (!firstExplosion && timePassed >= FirstExplosion) { firstExplosion = true; //call first explosion, second explosion will be called by base code CreateExplosion(position); } }
public FututreGan(float xval, float yval) : base(xval, yval) { CooldownBinding = new StateBinding("cooldown"); _editorName = "Fututre Gan"; _bio = "For Fututre Use"; ammo = MaxAmmo; _type = "gun"; graphic = sprite = new SpriteMap(DuckUtils.GetAsset("weapons/fututre_gan.png"), 16, 16); center = new Vec2(7f, 9f); collisionOffset = new Vec2(-7f, -4f); collisionSize = new Vec2(13f, 9f); _barrelOffsetTL = new Vec2(14f, 6f); _fullAuto = false; _fireWait = 0f; _kickForce = 0.5f; _holdOffset = new Vec2(0f, 0f); UpdateSprite(); }
public ClashShield(float xval, float yval) : base(xval, yval) { ActiveBinding = new StateBinding("Active"); LowChargeBinding = new StateBinding("LowCharge"); _editorName = "Clash Shield"; graphic = spriteMap = new SpriteMap(DuckUtils.GetAsset("weapons/clash_shield.png"), 32, 32); lightning1 = new SpriteMap(DuckUtils.GetAsset("weapons/clash_shield_lightnings.png"), 12, 6); lightning2 = new SpriteMap(DuckUtils.GetAsset("weapons/clash_shield_lightnings.png"), 12, 6); depth = depth - 2; spriteMap.AddAnimation("idle", 0.4f, false, 0); spriteMap.AddAnimation("active", 0.2f, true, 1, 2, 3, 4, 5, 6, 7, 6, 5, 4, 3, 2); spriteMap.AddAnimation("low", 0.2f, true, 1, 0, 2, 0, 0, 3, 4, 0, 5, 0, 6, 0, 7, 0, 5, 0, 4, 0, 3, 0, 2); lightning1.AddAnimation("idle", 0.4f, false, 0); lightning1.AddAnimation("active", 0.2f, true, LightningPattern1); lightning1.AddAnimation("low", 0.2f, true, 15, 0, 12, 0, 0, 3, 7, 0, 1, 0, 9, 0, 5, 0, 10, 0, 9, 0, 4); lightning2.AddAnimation("idle", 0.4f, false, 0); lightning2.AddAnimation("active", 0.2f, true, LightningPattern2); lightning2.AddAnimation("low", 0.2f, true, 5, 0, 7, 0, 0, 1, 8, 0, 12, 0, 11, 0, 8, 0, 3, 0, 2, 0, 4); sound = SFX.Get(DuckUtils.GetAsset("sounds/clash_shield.wav"), 1f, 0f, 0f, true); ammo = 99; thickness = 8.9f; weight = 9f; center = new Vec2(16f, 18f); collisionOffset = new Vec2(-3f, -18f); collisionSize = new Vec2(16f, 27f); handOffset = new Vec2(0f, 1000000f); _holdOffset = new Vec2(-3f, 4f); _barrelOffsetTL = new Vec2(23f, 12f); }
public FrogLauncher(float xval, float yval) : base(xval, yval) { AimAngleBinding = new StateBinding("aimAngle"); StateBinding = new StateBinding("stateIndex"); _editorName = "Frog Launcher"; _bio = "This boy can fit " + MaxAmmo + " frogs innit!"; ammo = MaxAmmo; _type = "gun"; graphic = baseSprite = new SpriteMap(DuckUtils.GetAsset("weapons/frog_launcher_base.png"), 24, 12); ammoSprite = new SpriteMap(DuckUtils.GetAsset("weapons/frog_launcher_ammo.png"), 26, 12); for (int i = 1; i <= 4; i++) { int rowStartIdx = (5 - i) * 4; ammoSprite.AddAnimation("idle" + i, 0.4f, false, rowStartIdx + 0); ammoSprite.AddAnimation("load" + i, 0.4f, false, rowStartIdx + 1, rowStartIdx + 2, rowStartIdx + 3); } ammoSprite.AddAnimation("empty", 0.4f, false, 21); ammoSprite.AddAnimation("idleOver", 0.4f, false, 0); ammoSprite.AddAnimation("loadOver", 0.4f, false, 1, 2, 3, 20); ammoSprite.SetAnimation("empty"); center = new Vec2(6f, 7f); collisionOffset = new Vec2(-6f, -4f); collisionSize = new Vec2(16f, 8f); _barrelOffsetTL = new Vec2(25f, 4f); _laserOffsetTL = new Vec2(22f, 4f); _fireSound = "pistol"; _kickForce = 3f; _holdOffset = new Vec2(-3f, 0f); _ammoType = new ATGrenade(); UpdateSprites(); }
public Frog(float xpos, float ypos, bool direction) : base(xpos, ypos) { // _sprite.AddAnimation("frog", 1f, true, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10); //_sprite.SetAnimation("frog"); graphic = new SpriteMap(DuckUtils.GetAsset("part/frog.png"), 16, 16); float scale = xscale = yscale = Rando.Float(0.5f, 0.8f); lifetime = Rando.Float(3f, 6f); center = new Vec2(8f, 7f); collisionOffset = new Vec2(-6f, -5f); collisionSize = new Vec2(11f, 14f * scale); depth = -0.5f; bouncy = 0.1f; friction = 0.15f; thickness = 2f; weight = 1.4f; _impactThreshold = 0.01f; jumpDirection = direction ? 1 : -1; jumpTime = Rando.Float(0f, 2f); }
public VoteGun(float xval, float yval) : base(xval, yval) { PlayBinding = new StateBinding("Playing"); _bio = "Golosovanie!"; _editorName = "Vote Gun"; ammo = LoopTimingsAmount; _ammoType = new ATGrenade(); _type = "gun"; sprite = new SpriteMap(DuckUtils.GetAsset("weapons/dubstep_gun.png"), 16, 16); sprite.AddAnimation("anim", Maths.IncFrameTimer() * 4f, true, 0, 1, 2, 3); sprite.SetAnimation("anim"); graphic = sprite; center = new Vec2(8f, 10f); sound = SFX.Get(DuckUtils.GetAsset("sounds/vote_loop.wav"), 1f, 0f, 0f, false); collisionOffset = new Vec2(-8f, -6f); collisionSize = new Vec2(16f, 11f); _barrelOffsetTL = new Vec2(16f, 6f); _kickForce = 3f; _holdOffset = new Vec2(-1f, 0f); loseAccuracy = 0.1f; maxAccuracyLost = 2f; physicsMaterial = PhysicsMaterial.Metal; _ammoType = new ATShotgun(); _ammoType.range = 100f; _type = "gun"; _kickForce = 10f; _numBulletsPerFire = 7; }
public override void Update() { if (netEquippedDuck != null && !Playing) { sound.Play(); Playing = true; } if (Playing) { Timer += Maths.IncFrameTimer(); graphic = pickupSprite = _sprite = new SpriteMap(DuckUtils.GetAsset("hats/imstuff.png"), 129, 153); if (Timer > 18.2f) { Explosion.Create(this, position, ExplosionShrapnel); netEquippedDuck = null; Level.Remove(this); } } base.Update(); }
public EjectedCap(float xpos, float ypos) : base(xpos, ypos, DuckUtils.GetAsset("shell/frog_grenade.png")) { }
public override void Update() { base.Update(); if (lifetime < 0) { Explosion.Create(this, position, new Explosion.Config(ExplosionShrapnel, DuckUtils.GetAsset("sounds/frog_explosion.wav"), false)); for (int i = 0; i < 2; i++) { Level.Add(SmallSmoke.New(x + Rando.Float(-8f, 8f), y + Rando.Float(-8f, 8f))); } Level.Remove(this); } else { lifetime -= Maths.IncFrameTimer(); } UpdateBehavior(); }