/// <summary> /// Инициализирует класс GGame /// </summary> public GGame() { MScreen = new ManagementScreen(this); audio = new GAudio(); fileIO = new GFileIO(); graphics = new GGraphics(); input = new GInput(); physics = new GPhysics(this); camera = new GCamera(); systemParticles = new GSystemParticles(this); MScreen.SetCurrentScreen(GetStartScreen()); DoubleBuffered = true; Size = new Size(500, 700); Paint += GGame_Paint; MouseDown += GGame_MouseDown; MouseUp += GGame_MouseUp; MouseMove += GGame_MouseMove; DeltaTime = System.DateTime.Now.Millisecond; PrevDeltaTime = System.DateTime.Now.Millisecond; }
/// <summary> /// Инициализирует класс GGame /// </summary> public GGame(Activity context) : base(context) { DisplayMetrics displayMetrics = new DisplayMetrics(); context.Window.WindowManager.DefaultDisplay.GetMetrics(displayMetrics); width = displayMetrics.WidthPixels; height = displayMetrics.HeightPixels; MScreen = new ManagementScreen(this); audio = new GAudio(); fileIO = new GFileIO(); graphics = new GGraphics(); input = new GInput(); physics = new GPhysics(this); camera = new GCamera(); systemParticles = new GSystemParticles(this); MScreen.SetCurrentScreen(GetStartScreen()); DeltaTime = System.DateTime.Now.Millisecond; PrevDeltaTime = System.DateTime.Now.Millisecond; SetOnTouchListener(this); }