mirror of https://github.com/kurisufriend/ballz
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1021 B
39 lines
1021 B
using System;
|
|
using SFML.Audio;
|
|
using SFML.Graphics;
|
|
using SFML.Window;
|
|
using SFML.System;
|
|
using System.Net;
|
|
using System.Threading;
|
|
using System.Collections.Generic;
|
|
|
|
namespace game
|
|
{
|
|
class Program
|
|
{
|
|
static void Main(string[] args)
|
|
{
|
|
RenderWindow window = new RenderWindow(new VideoMode(1280, 720), "test", Styles.Default);
|
|
|
|
callbacks.registerCallbacks(window);
|
|
|
|
g.entityList.Add(new ball_t(50f, new Vector2f(1280 / 2, 720 / 2), new Vector2f(.2f, .2f)));
|
|
g.entityList.Add(new ball_t(25f, new Vector2f(100, 100), new Vector2f(.2f, .2f)));
|
|
g.entityList.Add(new ball_t(25f, new Vector2f(300, 100), new Vector2f(.2f, .2f)));
|
|
g.entityList.Add(new ball_t(25f, new Vector2f(200, 100), new Vector2f(.2f, .2f)));
|
|
|
|
|
|
while (window.IsOpen)
|
|
{
|
|
window.DispatchEvents();
|
|
g.entityList.Run(window);
|
|
g.renderTexture.Display();
|
|
window.Clear();
|
|
Sprite sprite = new Sprite(g.renderTexture.Texture);
|
|
window.Draw(sprite);
|
|
g.renderTexture.Clear();
|
|
window.Display();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|