public GameObject( float x = 0, float y = 0, float hsp = 0, float vsp = 0, float dir = 0, float maskX = 0, float maskY = 0, float maskW = 0, float maskH = 0, EksedraSprite spriteIndex = null, int imageIndex = 0, int imageSpeed = 1, float imageScaleX = 1, float imageScaleY = 1, int room = 0, int depth = 0, Engine engine = null) { X = x; Y = y; HSpeed = hsp; VSpeed = vsp; Dir = dir; MaskX = maskX; MaskY = maskY; MaskWidth = maskW; MaskHeight = maskH; SpriteIndex = spriteIndex; ImageIndex = imageIndex; ImageSpeed = imageSpeed; ImageScaleX = imageScaleX; ImageScaleY = imageScaleY; Depth = depth; RunningEngine = engine; Persistant = false; Tag = ""; Timers = new float[10] { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }; Cull = true; }
public Engine(uint windowWidth, uint windowHeight, string windowTitle, string startRoom, List <Type> customGameObjectTypes, string projectNamespace, EksedraSprite loadingSprite) { Thread loadingThread = null; if (loadingSprite != null) { loadingThread = new Thread(new ParameterizedThreadStart(DrawLoadingScreen)); loadingThread.Start(new LoadingScreen(loadingSprite, this)); QuitLoading = false; } Console.Write("Loading assets..."); CurrentRoom = startRoom; LoadAllRooms(customGameObjectTypes, projectNamespace); LoadAllImages(); LoadAllMusic(); LoadAllFonts(); Console.WriteLine(" Done."); if (loadingThread != null) { QuitLoading = true; loadingThread.Join(); } Console.Write("Setting up..."); WindowWidth = windowWidth; WindowHeight = windowHeight; WindowTitle = windowTitle; Quit = false; KeysDown = new bool[(int)Keyboard.Key.KeyCount]; KeysUp = new bool[(int)Keyboard.Key.KeyCount]; KeysHeld = new bool[(int)Keyboard.Key.KeyCount]; KeysOff = new bool[(int)Keyboard.Key.KeyCount]; for (int i = 0; i < (int)Keyboard.Key.KeyCount; i++) { KeysDown[i] = false; KeysUp[i] = false; KeysHeld[i] = false; KeysOff[i] = true; } ViewPort = new FloatRect(0, 0, WindowWidth / 2, WindowHeight / 2); Console.WriteLine(" Done."); }
public LoadingScreen(EksedraSprite sprite, Engine engine) { Spr = sprite; RunningEngine = engine; }