This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class CollectionExtensions | |
{ | |
/// <summary> | |
/// A Linq-like method for getting a random element from an IEnumerable | |
/// </summary> | |
/// <typeparam name="T">The element type</typeparam> | |
/// <param name="array">The array to fetch an element from</param> | |
/// <param name="rand">Optional Random instance, if not provided | |
/// the method will use the RandomService.</param> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Narfox.Utilities | |
{ | |
public enum EmitterScale | |
{ | |
Small = 16, | |
Medium = 64, | |
Large = 256 | |
} | |
public class EasyEmitter : Emitter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FlatRedBall; | |
using FlatRedBall.Audio; | |
using FlatRedBall.Content; | |
using Microsoft.Xna.Framework; | |
using Microsoft.Xna.Framework.Audio; | |
using Microsoft.Xna.Framework.Media; | |
using NarfoxGameTools.Extensions; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FlatRedBall.Graphics; | |
using FlatRedBall.Performance; | |
using System; | |
using System.Linq; | |
namespace MasteroidPE.Factories | |
{ | |
public class Factory<T> where T : IPoolable, IDestroyable, new() | |
{ | |
PoolList<T> pool = new PoolList<T>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Texture Mapping Helper</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<style> | |
html, body, div, img { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using FlatRedBall; | |
using FlatRedBall.Graphics; | |
using Microsoft.Xna.Framework.Graphics; | |
using System; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
namespace Masteroid.Utilities | |
{ | |
public class ScreenshotUtility |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public struct HSLColor | |
{ | |
// HSL stands for Hue, Saturation and Luminance. HSL | |
// color space makes it easier to do calculations | |
// that operate on these channels | |
// Helpful color math can be found here: | |
// https://www.easyrgb.com/en/math.php | |
/// <summary> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Text; | |
using System.Net; | |
using System.Collections.Specialized; | |
using System.Collections.Generic; | |
#if DESKTOP_GL | |
using System.Web; | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Modular JavaScript Example</title> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> | |
<script> | |
//========================================================================== | |
// This is an application, we write JavaScript this way so that |