Skip to content

Instantly share code, notes, and snippets.

@marpe
marpe / SpriteBatch.cs
Created December 22, 2022 06:42
MoonWorks SpriteBatch
namespace MyGame.Graphics;
[Flags]
public enum SpriteFlip
{
None = 0,
FlipVertically = 1,
FlipHorizontally = 2,
}
@marpe
marpe / example.cs
Last active December 14, 2022 18:47
ImGui window with splitter using docking
using System;
public abstract class SplitWindow
{
private string _leftTitle;
private string _rightTitle;
private string _dockSpaceId;
private Action _drawLeft;
private Action _drawRight;
public string Title;
@marpe
marpe / ImGuiRenderer.cs
Created November 13, 2022 12:59
Moonworks ImGui renderer
#pragma warning disable CS8618
using System.Runtime.InteropServices;
using ImGuiNET;
using MyGame.Graphics;
using SDL2;
namespace MyGame.TWImGui;
public enum ImGuiFont
namespace GunSmoker.Input;
public class InputBinds
{
[CVar("p1_gp_index", "Player 1 controller index")]
public static int P1ControllerIndex = 0;
[CVar("p2_gp_index", "Player 2 controller index")]
public static int P2ControllerIndex = 1;
@marpe
marpe / main.yml
Created February 4, 2021 10:29
gameci workflow file for unity testing with coverage and building
name: Actions 😎
on:
push:
branches:
- master
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}