Skip to content

Instantly share code, notes, and snippets.

View ZachIsAGardner's full-sized avatar
🐢
:^)

Zachary Gardner ZachIsAGardner

🐢
:^)
View GitHub Profile
@ZachIsAGardner
ZachIsAGardner / Lib.cs
Created January 29, 2024 14:13
ProgressiveSound
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Newtonsoft.Json;
@ZachIsAGardner
ZachIsAGardner / BuildContent.js
Last active December 15, 2023 02:50
MonoGame automatic content.mgcb
const fs = require('fs');
// Leave out audio for faster load times
const leaveOutAudio = false;
const assetsPath = `${__dirname}/../Content/Assets`;
const contentPath = `${__dirname}/../Content/Content.mgcb`;
// ---
function parseDirectory(path, output) {
@ZachIsAGardner
ZachIsAGardner / DynamicSong.cs
Created February 23, 2022 18:13
Reading .ogg songs in MonoGame C#
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
using System.IO;
using System.Threading.Tasks;
using NVorbis;
@ZachIsAGardner
ZachIsAGardner / AnimationState.cs
Last active January 22, 2022 16:51
Animator Example
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
namespace MyMonoGame
{
public class AnimationState
@ZachIsAGardner
ZachIsAGardner / AxisState.cs
Created January 7, 2022 16:43
MonoGame Input Example
using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Audio;
namespace MyMonoGame
{
/// <summary>The current state of any kind of axis (gamepad stick, gamepad trigger)</summary>
public class AxisState