/// <summary> /// Update debugging stuff<para/> /// Обновление дебаг-данных /// </summary> public static void Update() { if (Controls.Input.KeyPress(Key.KeypadPlus)) { CityManager.Interior = (Data.ItemPlacement.Interior)(((int)CityManager.Interior + 1) % 19); } if (Controls.Input.KeyPress(Key.Keypad0)) { CityManager.Interior = Data.ItemPlacement.Interior.World; } if (Controls.Input.KeyPress(Key.Q)) { PhysicsManager.SetBox(Entities.Camera.Position, Entities.Camera.TransformDirection(Vector3.UnitZ * 50f)); } Graphics.Transform t = new Graphics.Transform() { Scale = Vector3.One, Position = PhysicsManager.pos, Angles = PhysicsManager.rot }; box.Matrix = t.Matrix; }
/// <summary> /// Update debugging stuff<para/> /// Обновление дебаг-данных /// </summary> public static void Update() { if (Controls.Input.KeyPress(Key.KeypadPlus)) { CityManager.Interior = (Data.ItemPlacement.Interior)(((int)CityManager.Interior + 1) % 19); } if (Controls.Input.KeyPress(Key.Keypad0)) { CityManager.Interior = Data.ItemPlacement.Interior.World; } if (Controls.Input.KeyPress(Key.Q)) { PhysicsManager.SetBox(Entities.Camera.Position, Entities.Camera.TransformDirection(Vector3.UnitZ * 50f)); } Graphics.Transform t = new Graphics.Transform() { Scale = Vector3.One, Position = PhysicsManager.pos, Angles = PhysicsManager.rot }; ApplyAnimationFrame(man.Children, animation, time); time += 0.016f; time = time % animation.Length; if (Input.KeyPress(Key.P)) { Debug.WriteLine(Camera.Position); } box.Matrix = t.Matrix; }
public GameObject(string _name) { Name = _name; Graphics.Transform _transComponent = new Graphics.Transform( ); _transComponent.Position = new Vector2(0, 0); _transComponent.Scale = new Vector2(32, 32); transform = ( Transform )AddComponent(_transComponent); Enabled = true; World.WorldManager.AddGameObjectToWorld(this); }
/// <summary> /// Update debugging stuff<para/> /// Обновление дебаг-данных /// </summary> public static void Update() { if (Controls.Input.KeyPress(Key.KeypadPlus)) { CityManager.Interior = (Data.ItemPlacement.Interior)(((int)CityManager.Interior + 1) % 19); } if (Controls.Input.KeyPress(Key.Keypad0)) { CityManager.Interior = Data.ItemPlacement.Interior.World; } if (Controls.Input.KeyPress(Key.Q)) { PhysicsManager.SetBox(Entities.Camera.Position, Entities.Camera.TransformDirection(Vector3.UnitZ * 50f)); } Graphics.Transform t = new Graphics.Transform() { Scale = Vector3.One, Position = PhysicsManager.pos, Angles = PhysicsManager.rot }; box.Matrix = t.Matrix; }