public GameObject(string type) { Type = type; EntityId = TomatoMainEngine.GetNewEntityId(); _color[0] = 255; _color[1] = 255; _color[2] = 255; }
public GameObject() { Type = "Def"; EntityId = TomatoMainEngine.GetNewEntityId(); _color[0] = 255; _color[1] = 255; _color[2] = 255; }
public static void BallDemo(TomatoMainEngine engine) { SoundPool.PlayBackgroundMusic("Bricks"); Random r = new Random(); for ( int i = 0; i < 2; i++ ) { var a = new ParticleBallDemo.FlammingBall(); a.SetPos(r.Next(-10, 10), r.Next(-10, 10)); a.SetRotation((float)r.Next(100) / 50); TomatoMainEngine.AddGameObject(a); } }
public GameObject(string type, float x, float y, float sx, float sy) { EntityId = TomatoMainEngine.GetNewEntityId(); _pos.x = x; _pos.y = y; _size.x = sx; _size.y = sy; _physSize = (_size.x + _size.y) / 2; _color[0] = 255; _color[1] = 255; _color[2] = 255; }
public static void BallDemo(TomatoMainEngine engine) { SoundPool.PlayBackgroundMusic("Bricks"); Random r = new Random(); for (int i = 0; i < 2; i++) { var a = new ParticleBallDemo.FlammingBall(); a.SetPos(r.Next(-10, 10), r.Next(-10, 10)); a.SetRotation((float)r.Next(100) / 50); TomatoMainEngine.AddGameObject(a); } }
public static void SpaceTest(TomatoMainEngine engine) { //adds the background //RenderObject background = new RenderObject("",0,0,30,30); //background.SetTexture(ResourceManager.GetTexture("background")); //TomatoMainEngine.GameObjects.Add(background); //add a space ship TomatoMainEngine.GameObjects.Add(new SpaceGame.SpaceShip()); Random r = new Random(); for ( int i = 0; i < 200; i++) { var a = new SpaceGame.Asteroid(); a.SetPos(r.Next(-100, 100), r.Next(-100, 100)); a.SetRotation((float)r.Next(100) / 50); //a.SetVelocityAdd((float)r.Next(-10,10) / 50, (float)r.Next(-10,10) / 50); TomatoMainEngine.AddGameObject(a); } }
public static void SpaceTest(TomatoMainEngine engine) { //adds the background //RenderObject background = new RenderObject("",0,0,30,30); //background.SetTexture(ResourceManager.GetTexture("background")); //TomatoMainEngine.GameObjects.Add(background); //add a space ship TomatoMainEngine.GameObjects.Add(new SpaceGame.SpaceShip()); Random r = new Random(); for (int i = 0; i < 200; i++) { var a = new SpaceGame.Asteroid(); a.SetPos(r.Next(-100, 100), r.Next(-100, 100)); a.SetRotation((float)r.Next(100) / 50); //a.SetVelocityAdd((float)r.Next(-10,10) / 50, (float)r.Next(-10,10) / 50); TomatoMainEngine.AddGameObject(a); } }
public DebugTools(TomatoMainEngine engine) { InitializeComponent(); _engine = engine; }
//Build the level / init map / add player etc public virtual void Build(TomatoMainEngine engine) { }
/// <summary> /// Initializes a new instance of the <see cref="SharpGLForm"/> class. /// </summary> public SharpGLForm() { engine = new TomatoMainEngine(this); InitializeComponent(); }