public void OnPower() { IsStarting = true; TextAsset code = Resources.Load("start") as TextAsset; // draw logo Texture2D logo = Resources.Load("logo") as Texture2D; int xcenter = (DisplaySystem.WIDTH - logo.width) / 2; int ycenter = (DisplaySystem.HEIGHT + logo.height) / 2; _screen.SetFontColor(Color.white); _screen.SetBackColor(Color.black); _screen.Clear(); _screen.DrawImage(xcenter, ycenter, logo.width, logo.height, logo.GetPixels()); _runner.RunCode(code.text); }
void SetBackColor(int r, int g, int b) { Color c = Utils.ParseColor(r, g, b); _console.Invoker.Add(() => _display.SetBackColor(c)); }