private void OnPaint(UIElement element, SKCanvas canvas) { Timer.Update(); var deltaTime = HipsterEngine.DeltaTime.GetDeltaTime(); mControl.Update(); mControl.Draw(); aControl.Draw(); HipsterEngine.Surface.Canvas.Save(); HipsterEngine.Surface.Canvas.Translate(HipsterEngine.Surface.Canvas.Camera.X, HipsterEngine.Surface.Canvas.Camera.Y); HipsterEngine.Surface.Canvas.Scale(HipsterEngine.Surface.Canvas.Camera.ScaleX, HipsterEngine.Surface.Canvas.Camera.ScaleY); Earth.Step(); Earth.Draw(); Trees.ForEach(t => { t.Step(); t.Draw(); }); // Robots.ForEach(r => // { // r.Update(1, 1); // r.Draw(HipsterEngine.Surface.Canvas); // }); HipsterEngine.Physics.Step(1.0f, 20); HipsterEngine.Particles.Draw(HipsterEngine.Surface.Canvas.GetSkiaCanvas()); HipsterEngine.Surface.Canvas.Restore(); }
private void CheckBook() { BuildObjectsTable(); CheckVariablesUsage(); if (ErrorsCount == 0 && WarningsCount == 0) { BuildBasicObjectsTrees(); CheckObjectsInterMachines(); Trees.ForEach(bot => MessagesList.AddRange(bot.Messages)); if (ErrorsCount == 0 && WarningsCount == 0) { BuildVariablesStore(); } } }
public override void Serialize(GenericWriter writer) { base.Serialize(writer); writer.Write(0); writer.Write(Trees == null ? 0 : Trees.Count); if (Trees != null) { Trees.ForEach(t => writer.Write(t)); } writer.Write(Spawn == null ? 0 : Spawn.Count); if (Spawn != null) { Spawn.ForEach(s => writer.Write(s)); } writer.Write(Bones); }