Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using NekuSoul.SharpDX_Engine;
- using NekuSoul.SharpDX_Engine.Objects;
- using System;
- namespace NekuSoul.SharpDX_Test
- {
- internal class Program
- {
- static Game _Game;
- [STAThread]
- private static void Main()
- {
- _Game = new Game(1366, 768);
- _Game.RunScene(new TestScene(_Game));
- _Game.Run();
- }
- }
- class TestScene : Scene
- {
- float i = 0;
- Game _Game;
- public TestScene(Game _Game)
- {
- this._Game = _Game;
- }
- public override void Update()
- {
- i += 0.001f;
- TestObject C = new TestObject();
- C.Position.X = 30;
- C.Position.Y = 748;
- C.add += (float)Math.Tan(i);
- DrawableObjectList.Add(C);
- }
- }
- class TestObject : DrawableObject
- {
- public float i = 1;
- public float add = 0.05f;
- public override void Update()
- {
- i += add;
- Position.X += ((35 * (float)Math.Sin(i)) + 0.6f);
- Position.Y += ((35 * (float)Math.Cos(i)) - 0.35f);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement