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
Shader "Surface/Standard With Camera Clipping Tesselate" { | |
Properties { | |
_Tess ("Tessellation", Range(1,32)) = 4 | |
_Color ("Color", Color) = (1,1,1,1) | |
_MainTex ("Albedo (RGB)", 2D) = "white" {} | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
_Metallic ("Metallic", Range(0,1)) = 0.0 | |
_ClipThreshold("Clip Threshold", Float) = 1 | |
_EdgeSize("Clip Edge Size", Float) = 1 | |
_ClipColor("Clip Edge Color", Color) = (1,1,1,1) |
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
Shader "Three Texture Additive Soft Particle" | |
{ | |
Properties | |
{ | |
_TintColor("Tint Color", Color) = (0.5, 0.5, 0.5, 0.5) | |
_MainTex("Main Texture", 2D) = "white" {} | |
_SecondTex("Second Texture", 2D) = "white" {} | |
_ThirdTex("Third Texture", 2D) = "white" {} | |
_PanSpeed("Panning Speed", Vector) = (0,0,0,0) | |
_ThirdPan("Third Texture Pan", Float) = 0 |
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
[System.Serializable] | |
public class DialogueContainer : ScriptableObject | |
{ | |
//Unique ID used as ref | |
public string ID; | |
//All variants of the text to display | |
public string contentText; | |
//The response options | |
public List<DialogueOptionContainer> responseOptions; | |
//The tags this dialogue uses |
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 GridManager : MonoBehaviour | |
{ | |
public int radiusInRingAmount = 5; | |
public GameObject tilePrefab; | |
public static List<Vector3> cubeCoordinates = new List<Vector3>(); | |
void Awake() | |
{ | |
GenerateGrid(); | |
} |
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
//Produces a flat mesh based on a spline, useful for creating roads. | |
public class SplineMesh : MonoBehaviour | |
{ | |
public static Mesh CreateSplineMesh(Vector3[] splinePoints, float[] widthPoints) | |
{ | |
Mesh mesh = new Mesh(); | |
Vector3[] vertices = new Vector3[splinePoints.Length * 2]; | |
//Create new vertices at both sides of the spline point | |
for (int i = 0; i < splinePoints.Length; i++) |
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
//A simple vertex displacement script that uses sine on two axis to emulate a wave-like behaviour. | |
public class WaveMesh : MonoBehaviour | |
{ | |
public MeshFilter meshFilter; | |
public float amplitude = 0.5f; | |
public float xLength = 0.5f; | |
public float zLength = 0.5f; | |
public float speed = 1.0f; | |
//Only affect the vertices above this heigth in local space | |
public float affectedVerticesHeightTreshold; |
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
Shader "Vertex/Gradient" { | |
Properties { | |
_TopColor("Top Color", Color) = (1,1,1,1) | |
_BottomColor ("Bottom Color", Color) = (1,1,1,1) | |
_Scale ("Scale", Float) = 1 | |
_Offset ("Offset", Float) = 1 | |
} | |
SubShader { | |
Tags {"Queue"="Transparent" "RenderType"="Transparent" "LightMode"="ForwardBase"} |