Example #1
0
 public GameObject(string type)
 {
     Type      = type;
     EntityId  = TomatoMainEngine.GetNewEntityId();
     _color[0] = 255;
     _color[1] = 255;
     _color[2] = 255;
 }
Example #2
0
 public GameObject()
 {
     Type      = "Def";
     EntityId  = TomatoMainEngine.GetNewEntityId();
     _color[0] = 255;
     _color[1] = 255;
     _color[2] = 255;
 }
Example #3
0
 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);
     }
 }
Example #4
0
 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;
 }
Example #5
0
        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);
            }
        }
Example #6
0
 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);
     }
 }
Example #7
0
        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);
            }
        }
Example #8
0
 public DebugTools(TomatoMainEngine engine)
 {
     InitializeComponent();
     _engine = engine;
 }
Example #9
0
 //Build the level / init map / add player etc
 public virtual void Build(TomatoMainEngine engine)
 {
 }
Example #10
0
 //Build the level / init map / add player etc
 public virtual void Build(TomatoMainEngine engine)
 {
 }
Example #11
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SharpGLForm"/> class.
        /// </summary>

        public SharpGLForm()
        {
            engine = new TomatoMainEngine(this);
            InitializeComponent();
        }
Example #12
0
 public DebugTools(TomatoMainEngine engine)
 {
     InitializeComponent();
     _engine = engine;
 }
Example #13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SharpGLForm"/> class.
 /// </summary>
 public SharpGLForm()
 {
     engine = new TomatoMainEngine(this);
     InitializeComponent();
 }