public AudioPlugin(string path, PluginInfo pluginInfo, BitmapImage thumbnail, IAudioPlugin plugin) { Path = path; PluginInfo = pluginInfo; Thumbnail = thumbnail; Plugin = plugin; }
public static IAudioPlugin GetAudioPlugin() { if (currentAudioPlugin == null) { currentAudioPlugin = new JohnnyAudioPlugin(); } return(currentAudioPlugin); }
public TestGame(IGraphicsPlugin graphics, IInputPlugin input, IAudioPlugin audio, ITimerPlugin timer, IResourceContext resourceContext) : base(graphics, input, audio, timer, resourceContext) { timer.TargetFps = 30; }
public AudioPluginTest(IAudioPlugin audioPlugin, List <IAudioFile> audioFiles) { AudioFiles = audioFiles; _audioPlugin = audioPlugin; }
protected GameContext(IGraphicsPlugin graphics, IInputPlugin input, IAudioPlugin audio, ITimerPlugin timer, IResourceContext predefinedResources) { Timer = timer; Graphics = graphics; Input = input; Audio = audio; var sprites = predefinedResources.GetPredefinedSprites(this); Sprites = new IndexedResourceManager <GameSprite>(sprites); var sounds = predefinedResources.GetPredefinedSounds(this); Sounds = new IndexedResourceManager <GameSound>(sounds); var backgrounds = predefinedResources.GetPredefinedBackgrounds(this); Backgrounds = new IndexedResourceManager <GameBackground>(backgrounds); var fonts = predefinedResources.GetPredefinedFonts(this); Fonts = new IndexedResourceManager <GameFont>(fonts); var paths = predefinedResources.GetPredefinedPaths(this); Paths = new IndexedResourceManager <GamePath>(paths); var scripts = predefinedResources.GetPredefinedScripts(this); Scripts = new IndexedResourceManager <GameScript>(scripts); var timelines = predefinedResources.GetPredefinedTimelines(this); Timelines = new IndexedResourceManager <GameTimeline>(timelines); var objects = predefinedResources.GetPredefinedObjects(this); Objects = new IndexedResourceManager <GameObject>(objects); foreach (var gameObject in Objects) { gameObject.OnRegisterEvents(); } Instances = new IndexedResourceManager <IInstance>(100001); var rooms = predefinedResources.GetPredefinedRooms(this); Rooms = new IndexedResourceManager <GameRoom>(rooms); RoomOrder = rooms.Select(r => r.Id).ToList(); var triggers = predefinedResources.GetPredefinedTriggers(this); Triggers = new IndexedResourceManager <ITrigger>(triggers); Instances.SetNextIndex(predefinedResources.NextInstanceId); Sprites.SetNextIndex(predefinedResources.NextSpriteId); Objects.SetNextIndex(predefinedResources.NextObjectId); Rooms.SetNextIndex(predefinedResources.NextRoomId); Graphics.Load += Graphics_Load; Graphics.Draw += Graphics_Update; Input.KeyPress += Input_KeyPress; Library = new StandardLibrary(this); Init(); }
public FakeGameContext(IGraphicsPlugin graphics, IInputPlugin input, IAudioPlugin audio, ITimerPlugin timer, IResourceContext resources) : base(graphics, input, audio, timer, resources) { }