This file contains 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
int[,] level = new int[200,100] | |
caveNoiseScalar = 9; | |
levelRatio = (float) level.GetLength(0) / level.GetLength(1); | |
RidgedMultifractal mountainTerrain = new RidgedMultifractal(); | |
Noise2D heightMapBuilder = new Noise2D(level.GetLength(0), level.GetLength(1), mountainTerrain); | |
Vector2Int startPoint = new Vector2Int(Random.Range(0, 8192), Random.Range(0, 8192)); | |
heightMapBuilder.GeneratePlanar(startPoint.x + 0, startPoint.x + caveNoiseScalar * levelRatio, startPoint.y + 0, startPoint.y + caveNoiseScalar); | |
float[,] heightMap = heightMapBuilder.GetNormalizedData(); |
This file contains 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.Generic; | |
using UnityEngine; | |
using DG.Tweening; | |
public class LoadingDots : MonoBehaviour { | |
//the total time of the animation | |
public float repeatTime = 1; | |
//the time for a dot to bounce up and come back down |
This file contains 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; | |
public class TetherExample : MonoBehaviour | |
{ | |
public Transform anchor; | |
public Transform player; | |
public LineRenderer lineRenderer; |
This file contains 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 class TypewriterEffect : MonoBehaviour | |
{ | |
public TextMeshProUGUI textMesh; | |
public float typeSpeed = 0.025f; | |
public Action OnTypewriterCompleted; | |
private int currentCursorLocation = 0; | |
public void SetText(string text) |
This file contains 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.Generic; | |
using System.IO; | |
using ProtoTurtle.BitmapDrawing; | |
using TMPro; | |
using UnityEngine; | |
public class ImageLoader : MonoBehaviour | |
{ | |
public class NewImageEventArgs { public Texture2D Tex2D; public string FilePath; public bool InitialLoad; }; | |
public delegate void NewImageEventHandler(NewImageEventArgs onNewImageEventArgs); |