protected override void SetupFilterGraph(IFilterGraph graph) { _audioEngine = new X3DAudioEngine(); _graph = graph as IGraphBuilder; base.SetupFilterGraph(graph); SetupAudio(); }
public GameEngine(IObservableTimer timer, IMessageBus bus, IGameObjectFactory factory, IGraphicsEngine graphics, IAudioEngine audio, IPhysicsEngine physics) { Timer = timer; Bus = bus; Graphics = graphics; Audio = audio; Physics = physics; Factory = factory; Bus.Add(new DebugMessage(Timer.LastTickTime, "Initialising Engines")); Bus.OfType<ExitGameRequest>().Subscribe(m => Stop()); Timer.Subscribe(Update); Timer.SubSample(5).Subscribe(t => bus.SendAll()); Running = false; }
public Question( IAudioEngine s, EventManager m, string q1, string q2, string q3, bool fast, bool pfase, int fa, byte faNo, SaveData save) : base(s, m, " " + q1, " " + q2, " " + q3, false, save) { this.faseseet = fa; this.faseNo = faNo; this.printfase = pfase; this.manyQuestion = 3; this.fastprint = fast; this.cursolposi[0] = new Vector2(40f, 108f); this.cursolposi[1] = new Vector2(40f, 124f); this.cursolposi[2] = new Vector2(40f, 140f); }
public Storm( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.invincibility = false; this.speed = 1; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40 + 4, this.position.Y * 24 + 42); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 - 4, this.position.Y * 24 + 42); } this.frame = 0; if (this.StandPanel.state == Panel.PANEL._sand) { this.element = ChipBase.ELEMENT.earth; this.power *= 2; this.StandPanel.state = Panel.PANEL._nomal; } this.sound.PlaySE(SoundEffect.shoot); this.cEle = this.element; }
public MimaFrame( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, Vector2 v, ChipBase.ELEMENT ele, int movespeed = 4) : base(so, p, pX, pY, u, po, ele) { this.movespeed = movespeed; this.invincibility = true; this.breakinvi = true; this.breaking = true; this.speed = s; this.positionDirect = v; this.positionold = this.position; this.OldPD = this.positionDirect; }
public ElementFire( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int roop, ChipBase.ELEMENT ele, bool twohit, int type = 0) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.type = type; this.twohit = twohit; this.roop = roop; this.speed = 3; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.invincibility = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.blue) { this.positionDirect = new Vector2(this.position.X * 40 - 8, this.position.Y * 24 + 42); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40 + 8, this.position.Y * 24 + 42); } this.frame = 0; this.color = Color.White; this.cEle = this.element; }
public SuzuranBlue( IAudioEngine s, SceneBattle p, int pX, int pY, Panel.COLOR union, int HP, int time) : base(s, p, pX, pY, union) { this.height = 48; this.wide = 32; this.hp = HP; this.hitPower = 0; this.hpmax = this.hp; this.unionhit = true; this.noslip = true; this.overslip = true; this.time = time; this.rebirth = union == Panel.COLOR.blue; this.positionDirect = new Vector2(pX * 40 + 16, pY * 24 + 64); }
public CompanionCharacter( IAudioEngine s, SceneMap p, Point po, int floor, Player player, MapCharacterBase.ANGLE a, SaveData save) : base(s, p, po, floor, a, p.Field, "companion", save, "") { this.rendType = 1; this.player = player; this.position = new Vector3(player.position.X - 8f, player.position.Y - 8f, player.position.Z); this.angle = player.Angle; for (int index = 0; index < this.positionLog.Length; ++index) { this.positionLog[index] = this.position; this.angleLog[index] = this.angle; this.runLog[index] = player.run; } this.animespeed = 6; }
public MassDriver(IAudioEngine s) : base(s) { this.rockOnPoint = new Point(-2, 0); this.number = 280; this.name = NSGame.ShanghaiEXE.Translate("Chip.MassDriverName"); this.element = ChipBase.ELEMENT.normal; this.power = 100; this.subpower = 0; this._break = false; this.powerprint = true; this.code[0] = ChipFolder.CODE.none; this.code[1] = ChipFolder.CODE.none; this.code[2] = ChipFolder.CODE.none; this.code[3] = ChipFolder.CODE.none; var information = NSGame.ShanghaiEXE.Translate("Chip.MassDriverDesc"); this.information[0] = information[0]; this.information[1] = information[1]; this.information[2] = information[2]; this.Init(); }
public AttackBase( IAudioEngine s, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, ChipBase.ELEMENT ele) : base(s, p) { this.element = ele; for (int index1 = 0; index1 < this.hitflag.GetLength(0); ++index1) { for (int index2 = 0; index2 < this.hitflag.GetLength(1); ++index2) { this.hitflag[index1, index2] = false; } } this.position = new Point(pX, pY); this.power = po; this.union = u; if (this.position.X < 0 || this.position.X >= 6) { this.flag = false; this.over = true; } this.keyName = this.ToString(); if (this.union == Panel.COLOR.red) { this.keyName = this.keyName + "*" + AttackBase.AtIDRed.ToString(); ++AttackBase.AtIDRed; } else { this.keyName = this.keyName + "*" + AttackBase.AtIDBlue.ToString(); ++AttackBase.AtIDBlue; } this.number = 200; }
public Tornado( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, ChipBase.ELEMENT ele, int s) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.invincibility = false; this.movespeed = s; this.speed = 1; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.hitting = true; this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40, this.position.Y * 24 + 50); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40, this.position.Y * 24 + 50); } this.frame = 0; this.sound.PlaySE(SoundEffect.shoot); if (this.union == Panel.COLOR.red) { this.movespeed *= -1; } this.OldPD = this.positionDirect; }
public Error(IAudioEngine s) : base(s) { this.printIcon = false; this.number = 0; this.name = NSGame.ShanghaiEXE.Translate("Chip.ErrorName"); this.element = ChipBase.ELEMENT.normal; this.power = 0; this.subpower = 0; this._break = false; this.powerprint = false; this.shadow = false; this.code[0] = ChipFolder.CODE.none; this.code[1] = ChipFolder.CODE.none; this.code[2] = ChipFolder.CODE.none; this.code[3] = ChipFolder.CODE.none; var informationDialogue = NSGame.ShanghaiEXE.Translate("Chip.ErrorDesc"); this.information[0] = informationDialogue[0]; this.information[1] = informationDialogue[1]; this.information[2] = informationDialogue[2]; }
public DelayMeteor( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int hittime, ChipBase.ELEMENT ele) : base(so, p, pX, pY, u, po, ele) { if (!this.flag) { return; } this.invincibility = true; this.movespeed = 8; this.hitting = false; this.hittime = hittime; this.animationpoint.X = 0; this.hitrange = new Point(0, 0); this.rebirth = this.union == Panel.COLOR.blue; this.positionre = this.position; if (this.union == Panel.COLOR.red) { this.positionDirect = new Vector2(this.position.X * 40, this.position.Y * 24 + 50); } else { this.positionDirect = new Vector2((this.position.X + 1) * 40, this.position.Y * 24 + 50); } this.frame = 0; this.breaking = false; if (this.union == Panel.COLOR.red) { this.movespeed *= -1; } this.parent.attacks.Add(new Dummy(this.sound, this.parent, this.position.X, this.position.Y, this.union, this.hitrange, hittime, true)); }
public MimaCharge( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, Vector2 v, ChipBase.ELEMENT ele, int movespeed = 4) : base(so, p, pX, pY, u, po, ele) { this.movespeed = movespeed; this.invincibility = true; this.breakinvi = true; this.breaking = true; this.speed = s; this.positionDirect = new Vector2((float)(position.X * 40.0 + 20.0), (float)(position.Y * 24.0 + 50.0)); this.positionold = this.position; this.OldPD = this.positionDirect; }
public EXSprayGun(IAudioEngine s) : base(s) { this.rockOnPoint = new Point(-2, 0); this.number = 277; this.name = NSGame.ShanghaiEXE.Translate("Chip.EXSprayGunName"); this.element = ChipBase.ELEMENT.poison; this.power = 600; this.subpower = 5; this._break = false; this.powerprint = true; this.code[0] = ChipFolder.CODE.none; this.code[1] = ChipFolder.CODE.none; this.code[2] = ChipFolder.CODE.none; this.code[3] = ChipFolder.CODE.none; var information = NSGame.ShanghaiEXE.Translate("Chip.EXSprayGunDesc"); this.information[0] = information[0]; this.information[1] = information[1]; this.information[2] = information[2]; this.Init(); }
public QuestSelect(IAudioEngine s, EventManager m, Player player, SaveData save) : base(s, m, save) { this.info = player.info; this.eventmanager = new EventManager(this.sound); this.NoTimeNext = false; for (int index1 = 0; index1 < this.questFlug.Length; ++index1) { bool flag = true; for (int index2 = 0; index2 < this.questFlug[index1].Length; ++index2) { if (this.questFlug[index1][index2] >= 0 && !this.savedata.FlagList[this.questFlug[index1][index2]]) { flag = false; } } if (flag) { this.questlist.Insert(0, this.questName[index1]); this.questlistNumber.Insert(0, index1); } } this.overTop = this.questlistNumber.Count - 8; if (this.overTop < 0) { this.overTop = 0; } for (int index = 0; index < this.endFlag.Length; ++index) { if (this.savedata.FlagList[this.endFlag[index]]) { this.savedata.questEnd[index] = true; if (this.savedata.ValList[11] == index) { this.savedata.ValList[11] = -1; } } } }
public NaviDeath( IAudioEngine s, SceneBattle p, Rectangle r, Rectangle rw, Rectangle rd, Vector2 v, string n, bool re, Point posis) : base(s, p, posis.X, posis.Y) { this.picturename = n; this.rectD = rd; this.rect = r; this.rectW = rw; this.posi = v; this.animationpoint.Y = 2; this.rebirth = re; this.white = true; this.sound.PlaySE(SoundEffect.clincher); }
public DammyEnemy( IAudioEngine s, SceneBattle p, int pX, int pY, EnemyBase MainEnemy, bool effect) : base(s, p, MainEnemy.position.X, MainEnemy.position.Y, (byte)MainEnemy.number, MainEnemy.union, MainEnemy.version) { this.slidePosition = new Point(pX, pY); this.position = new Point(MainEnemy.position.X + this.slidePosition.X, MainEnemy.position.Y + this.slidePosition.Y); this.MainEnemy = MainEnemy; this.effecting = effect; this.hpmax = 100000; this.hp = 100000; this.HPposition.X = -100f; this.positionDirect = MainEnemy.positionDirect; this.noslip = true; this.dropchips = MainEnemy.dropchips; this.race = MainEnemy.race; this.ID = MainEnemy.ID; }
public BigTyphoon(IAudioEngine s) : base(s) { this.rockOnPoint = new Point(-3, 0); this.number = 275; this.name = NSGame.ShanghaiEXE.Translate("Chip.BigTyphoonName"); this.element = ChipBase.ELEMENT.aqua; this.power = 30; this.subpower = 0; this._break = false; this.powerprint = true; this.code[0] = ChipFolder.CODE.none; this.code[1] = ChipFolder.CODE.none; this.code[2] = ChipFolder.CODE.none; this.code[3] = ChipFolder.CODE.none; var information = NSGame.ShanghaiEXE.Translate("Chip.BigTyphoonDesc"); this.information[0] = information[0]; this.information[1] = information[1]; this.information[2] = information[2]; this.Init(); }
public EndlessSahara(IAudioEngine s) : base(s) { this.number = 279; this.name = NSGame.ShanghaiEXE.Translate("Chip.EndlessSaharaName"); this.element = ChipBase.ELEMENT.earth; this.power = 100; this.subpower = 0; this._break = false; this.shadow = false; this.powerprint = true; this.code[0] = ChipFolder.CODE.none; this.code[1] = ChipFolder.CODE.none; this.code[2] = ChipFolder.CODE.none; this.code[3] = ChipFolder.CODE.none; var information = NSGame.ShanghaiEXE.Translate("Chip.EndlessSaharaDesc"); this.information[0] = information[0]; this.information[1] = information[1]; this.information[2] = information[2]; this.Init(); }
public MapCharacterBase( IAudioEngine s, SceneMap p, Point po, int floor, MapCharacterBase.ANGLE a, MapField fi) : base(s) { this.parent = p; this.angle = a; this.field = fi; this.floor = floor; if (this.field != null) { this.position = new Vector3(po.X, po.Y, floor); } else { this.position = new Vector3(po.X, po.Y, 0.0f); } }
public AnchorBomb( IAudioEngine so, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int s, Vector2 v, Point end, int t, AnchorBomb.TYPE ty, int color = -1) : base(so, p, pX, pY, u, po, ChipBase.ELEMENT.aqua) { this.breaking = true; this.hitting = false; this.speed = s; this.positionDirect = v; this.time = t; this.position = end; this.endposition = new Vector2(end.X * 40 + 20, end.Y * 24 + 80); this.movex = (v.X - this.endposition.X) / t; this.movey = (v.Y - this.endposition.Y) / t; this.plusy = 0.0f; this.speedy = 6f; this.plusing = this.speedy / time; this.rebirth = this.union == Panel.COLOR.red; this.type = ty; if (color >= 0) { this.colorA = color; } else { this.colorA = (int)this.type; } }
public Jizou( IAudioEngine s, SceneBattle p, int pX, int pY, Panel.COLOR union, int colorNo, int power) : base(s, p, pX, pY, union) { this.power = power; this.colorNo = colorNo; this.height = 40; this.wide = 40; this.hp = 10; this.hitPower = 200; this.hpmax = this.hp; this.unionhit = true; this.overslip = true; this.rebirth = (uint)union > 0U; this.positionre = this.position; this.positionDirect = new Vector2(pX * 40 + 24, pY * 24 + 72); }
public AudioEngine(AudioBackend backend = AudioBackend.Default) { if (backend == AudioBackend.Default) { backend = AudioBackend.OpenAL; } switch (backend) { case AudioBackend.OpenAL: #if !VORTICE_NO_OPENAL _backendEngine = new OpenAL.ALAudioEngine(); #else throw new AudioException($"{AudioBackend.XAudio2} Backend is not supported"); #endif break; } if (!_backendEngine.Initialize()) { //throw new AudioException($"{backend} Backend is not supported"); } }
public ElementSword(IAudioEngine s) : base(s) { this.infight = true; this.swordtype = true; this.number = 281; this.name = NSGame.ShanghaiEXE.Translate("Chip.ElementSwordName"); this.element = ChipBase.ELEMENT.normal; this.power = 120; this.subpower = 0; this._break = false; this.powerprint = true; this.code[0] = ChipFolder.CODE.none; this.code[1] = ChipFolder.CODE.none; this.code[2] = ChipFolder.CODE.none; this.code[3] = ChipFolder.CODE.none; var information = NSGame.ShanghaiEXE.Translate("Chip.ElementSwordDesc"); this.information[0] = information[0]; this.information[1] = information[1]; this.information[2] = information[2]; this.Init(); }
public HyperSpanner(IAudioEngine s) : base(s) { this.navi = true; this.number = 287; this.name = NSGame.ShanghaiEXE.Translate("Chip.HyperSpannerName"); this.element = ChipBase.ELEMENT.normal; this.power = 300; this.subpower = 0; this._break = true; this.shadow = false; this.powerprint = true; this.code[0] = ChipFolder.CODE.none; this.code[1] = ChipFolder.CODE.none; this.code[2] = ChipFolder.CODE.none; this.code[3] = ChipFolder.CODE.none; var information = NSGame.ShanghaiEXE.Translate("Chip.HyperSpannerDesc"); this.information[0] = information[0]; this.information[1] = information[1]; this.information[2] = information[2]; this.Init(); }
public ShanghaiDS(IAudioEngine s, SceneBattle p, int pX, int pY, byte n, Panel.COLOR u, byte v) : base(s, p, pX, pY, n, u, v, 3000, "ShanghaiDS", "ShanghaiDS") { /* todo: * have shanghaiDS assemble 'hands' by taking 5-6 chips from the deck * check hands for potential PAs * remove applicable chips from hand, replace with PA * make it so shanghaiDS assembles new hands when the player opens the custom screen * have shanghaiDS use buster attack when out of chips for that turn? * * have shanghaiDS mirror style changes (sprites at least?) * * chip 'location memory'? * this would require a pretty massive retcon in game code and adding stuff to the save * tl;dr MMBN4/5 recorded where on the screen you like to use chips, to use as a reference for what location MMDS would be when using it himself * * chip 'combo system'? * like location memory, but records which chips you like to use before and after each other, plus locations * * // * */ }
public AttackBase( IAudioEngine s, SceneBattle p, int pX, int pY, Panel.COLOR u, int po, int subp) : base(s, p) { for (int index1 = 0; index1 < this.hitflag.GetLength(0); ++index1) { for (int index2 = 0; index2 < this.hitflag.GetLength(1); ++index2) { this.hitflag[index1, index2] = false; } } this.position = new Point(pX, pY); this.power = po; this.subpower = subp; this.union = u; this.invincibilitytimeA = 120; }
public DisasterCrow(IAudioEngine s) : base(s) { this.navi = true; this.number = 288; this.name = NSGame.ShanghaiEXE.Translate("Chip.DisasterCrowName"); this.element = ChipBase.ELEMENT.leaf; this.power = 280; this.subpower = 0; this._break = false; this.shadow = false; this.powerprint = true; this.code[0] = ChipFolder.CODE.none; this.code[1] = ChipFolder.CODE.none; this.code[2] = ChipFolder.CODE.none; this.code[3] = ChipFolder.CODE.none; var information = NSGame.ShanghaiEXE.Translate("Chip.DisasterCrowDesc"); this.information[0] = information[0]; this.information[1] = information[1]; this.information[2] = information[2]; this.Init(); }
public RainAnchor(IAudioEngine s) : base(s) { this.navi = true; this.number = 294; this.name = NSGame.ShanghaiEXE.Translate("Chip.RainAnchorName"); this.element = ChipBase.ELEMENT.aqua; this.power = 120; this.subpower = 0; this._break = true; this.shadow = false; this.powerprint = true; this.code[0] = ChipFolder.CODE.none; this.code[1] = ChipFolder.CODE.none; this.code[2] = ChipFolder.CODE.none; this.code[3] = ChipFolder.CODE.none; var information = NSGame.ShanghaiEXE.Translate("Chip.RainAnchorDesc"); this.information[0] = information[0]; this.information[1] = information[1]; this.information[2] = information[2]; this.Init(); }
public GigaHalberd(IAudioEngine s) : base(s) { this.rockOnPoint = new Point(-1, 0); this.infight = true; this.number = 274; this.name = NSGame.ShanghaiEXE.Translate("Chip.GigaHalberdName"); this.element = ChipBase.ELEMENT.normal; this.power = 450; this.subpower = 0; this._break = false; this.powerprint = true; this.code[0] = ChipFolder.CODE.none; this.code[1] = ChipFolder.CODE.none; this.code[2] = ChipFolder.CODE.none; this.code[3] = ChipFolder.CODE.none; var information = NSGame.ShanghaiEXE.Translate("Chip.GigaHalberdDesc"); this.information[0] = information[0]; this.information[1] = information[1]; this.information[2] = information[2]; this.Init(); }
public ScreenBlack( IAudioEngine s, SceneBattle p, Vector2 pd, Point posi, ChipBase.ELEMENT ele, int _speed, bool rebirth, Color color, int alphaPlus) : base(s, p, posi.X, posi.Y) { this.rebirth = rebirth; this.element = ele; this.downprint = true; this.speed = _speed; this.positionDirect = pd; this.animationpoint.X = 3; this.alphaPlus = alphaPlus; this.endAlpha = color.A; this.color_ = Color.FromArgb(0, color); this.color = Color.FromArgb(0, Color.Black); }
/* public TestGameEngine() : base(new AsyncObservableTimer(), new MessageBus(), new TestFactory(), new TestGraphics(), new TestAudio(), new TestPhysics()) { Bus.OfType<GraphicsReady>().Subscribe(Start); } private void Start(GraphicsReady m) { Bus.Add(new DebugMessage(Timer.LastTickTime, "Starting Game")); for (int y = 0; y < 2; y++) for (int x = 0; x < 3; x++) { Bus.Add(new GameObjectRequest(m.TimeSent, new TestGameObject(Bus), new Vect3(3 * x, 3 * y , 0))); } var testGameObject = new TestGameObject(Bus); Bus.Add(new GameObjectRequest(m.TimeSent, testGameObject, new Vect3(-11, -1, 0))); Bus.Add(new SetVelocity(Timer.LastTickTime, testGameObject, new Vect3(3, 0, 0))); } * */ public TestGameEngine(IObservableTimer timer, IMessageBus bus, IGameObjectFactory factory, IGraphicsEngine graphics, IAudioEngine audio, IPhysicsEngine physics) : base(timer, bus, factory, graphics, audio, physics) { }