public Particle(Tortoise2d game, Texture t, float x, float y, float w, float h, float vx, float vy, float ax, float ay, float growx, float growy, float r, float g, float b, float a, float cr, float cg, float cb, float ca, int time) { this.game = game; this.t = t; this.x = x; this.y = y; this.w = w; this.h = h; this.vx = vx; this.vy = vy; this.ax = ax; this.ay = ay; this.growx = growx; this.growy = growy; this.r = r; this.g = g; this.b = b; this.a = a; this.cr = cr; this.cg = cg; this.cb = cb; this.ca = ca; this.time = time; tick = 0; alive = true; }
public Camera(Tortoise2d game,float x, float y) { this.game = game; this.x = x; this.y = y; zoomx = 1; zoomy = 1; }
public GameStateManager(Tortoise2d game, int max) { maxStates = max; states = new GameState[max]; names = new string[max]; dummyState = new GameState(game, this); this.game = game; }
public PCInput(Tortoise2d game) { now = new MouseState(); prev = new MouseState(); deltamouse = new float[3] { 0, 0, 0 }; this.game = game; keysDown = new bool[71]; keysPrev = new bool[71]; deltaMouse = new float[3]; }
public Renderable(Tortoise2d t, string textureName) { this.t = t; texture = t.textures.GetSprite(textureName); p = new Vector2[4]; for (int i = 0; i < 4; i++) { p[i] = new Vector2(); } }
public Renderable(Tortoise2d t, Texture texture) { this.t = t; this.texture = texture; p = new Vector2[4]; for(int i = 0; i < 4; i++) { p[i] = new Vector2(); } }
public ParticleSystem(Tortoise2d game, Texture t, int size) { this.size = size; this.game = game; this.t = t; parts = new Particle[size]; for(int i = 0; i < parts.Length; i++) { parts[i] = new Particle(game, t, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0); parts[i].alive = false; } }
public Renderer(Tortoise2d gg, int w, int h, int sprites, int maxlights, TextureManager t, Grid g) { game = gg; tm = t; width = w; height = h; _1920scale = (float)w / 1920; _1080scale = (float)h / 1080; //if not replace your stone-age-gpu for a decent one! Shader.GetSupported(); shader_plain = new Shader(Shader.RShaderFF("shaders/vertex_plain.glsl"), Shader.RShaderFF("shaders/frag_plain.glsl")); shader_w_light = new Shader(Shader.RShaderFF("shaders/vertex_plain.glsl"), Shader.RShaderFF("shaders/frag_with_light.glsl")); shader_o_light = new Shader(Shader.RShaderFF("shaders/vertex_plain.glsl"), Shader.RShaderFF("shaders/frag_only_light.glsl")); shader_merge = new Shader(Shader.RShaderFF("shaders/vertex_plain.glsl"), Shader.RShaderFF("shaders/frag_merge.glsl")); shader_merge_effect = new Shader(Shader.RShaderFF("shaders/vertex_plain.glsl"), Shader.RShaderFF("shaders/frag_merge_effect.glsl")); core = new RendererCore(sprites); fbo = new Fbo(width, height); this.grid = g; }
//ok public void END(Tortoise2d m) { Shader.Bind(null); core.ClearData(); //GL.Flush(); //GL.Finish(); m.SwapBuffers(); }
public runGame(Tortoise2d game, GameStateManager states) : base(game, states) { }
public flashScreen(Tortoise2d game, GameStateManager states) : base(game, states) { }
public GameState(Tortoise2d game, GameStateManager states) { this.states = states; this.game = game; }
public Program() { g = new Tortoise2d("Test", 1920, 1080, 16, 9, 1000, 10); g.SetGameFunctions(Load, Init, Update, Render); g.Run(60, 60); }