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 SpiralLoop | |
{ | |
public static void ExecuteCenterToOutter(int width, System.Action<int, int> callback) | |
{ | |
// Run the loop from the center outwards | |
for (int r = 0; r < width; r++) | |
{ | |
// If we are on center, do not run the edge loops | |
if (r == 0) | |
{ |
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
/* Creates a 1D array of noise values when provided with a 2D width and noise params. | |
* To be used in conjunction with FastNoiseLite HLSL. https://github.com/Auburn/FastNoise | |
* | |
* Created by: Jacob Fletcher | |
*/ | |
#pragma kernel CSNoiseArray | |
#include "Include/PicoFastNoiseUtils.hlsl" |
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
/* Written by Jacob Fletcher - 2022 | Free to alter and use! */ | |
using UnityEngine; | |
namespace PicoGames | |
{ | |
public static class GradientExtensions | |
{ | |
/// <summary> | |
/// Converts the Gradient into a new texture. |
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 UnityEngine; | |
using System.Collections.Generic; | |
using UnityEngine.Rendering; | |
namespace PicoGames.Prototype | |
{ | |
[System.Serializable] | |
public class InstancePrefab | |
{ | |
public GameObject prefab; |
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 UnityEngine; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace PicoGames | |
{ | |
public class MeshCombiner | |
{ | |
const int MAX_VERT_COUNT = 65535; |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using PicoGames.Common; | |
namespace PicoGames.Terrains.MS2D | |
{ | |
public class MS2DTerrainChunk : MonoBehaviour | |
{ |
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.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace PicoGames.Common | |
{ | |
[ExecuteInEditMode] | |
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer))] | |
public class MeshBuffer : MonoBehaviour | |
{ |