Small help with immutable types...
// private readonly int _age;
// public int Age { get { return _age; } }
public int Age { get; }| /** | |
| * PennerEasing | |
| * Calculates a float value between two target values using | |
| * Robert Penner's easing equations for interpolation over a specified duration. | |
| * | |
| * @author Darren David [email protected] | |
| * @version 1.0 | |
| * | |
| * Credit/Thanks: | |
| * Robert Penner - The easing equations we all know and love |
| using System; | |
| using System.Collections; | |
| using UnityEngine; | |
| using UnityEngine.Audio; | |
| /// <summary> | |
| /// This is a template to create a new Simple Audio Event. | |
| /// It supports an array of audio clips, pitch and volume variance, | |
| /// and a custom editor that shows a button to preview a random sound | |
| /// from the array with the selected pitch and volume variance. |
| // When creating shaders for Universal Render Pipeline you can you the ShaderGraph which is super AWESOME! | |
| // However, if you want to author shaders in shading language you can use this teamplate as a base. | |
| // Please note, this shader does not necessarily match perfomance of the built-in URP Lit shader. | |
| // This shader works with URP 7.1.x and above | |
| Shader "Universal Render Pipeline/Custom/Physically Based Example" | |
| { | |
| Properties | |
| { | |
| // Specular vs Metallic workflow | |
| [HideInInspector] _WorkflowMode("WorkflowMode", Float) = 1.0 |
| using UnityEngine; | |
| public static class Colors | |
| { | |
| public static readonly Color AbsoluteZero = new Color32( 0, 72, 186, 255 ); | |
| public static readonly Color Acajou = new Color32( 76, 47, 39, 255 ); | |
| public static readonly Color AcidGreen = new Color32( 176, 191, 26, 255 ); | |
| public static readonly Color Aero = new Color32( 124, 185, 232, 255 ); | |
| public static readonly Color AeroBlue = new Color32( 201, 255, 229, 255 ); | |
| public static readonly Color AfricanViolet = new Color32( 178, 132, 190, 255 ); |
| using UnityEngine; | |
| /* | |
| A Unity3D class for snapping pixel art to multiples of a whole (design scale) pixel | |
| Use in conjunction with an appropriately scaled Otho Camera | |
| License: MIT | |
| Written by Lee Grey (@mothteeth) | |
| */ |
| /* | |
| Basic Sprite Shader for aligning pixel art to the same grid, based on the Unity Sprite Shader. | |
| Create one Material where you assign the same Pixels Per Unit value you use on your imported Sprites, | |
| then reuse this Material on all appropriate Sprite Renderers. | |
| (As far as I know there's no possiblity to get this value automatically.) | |
| This is not for scaled or rotated artwork. If you need those features, look at low res render textures. | |
| Use this however you want. |
| using System.Collections.Generic; | |
| using System.Diagnostics; | |
| using Debug = UnityEngine.Debug; | |
| /* | |
| USAGE: | |
| ProcessTimer.Start("unique_process_id"); | |
| // do stuff | |
| ProcessTimer.End("unique_process_id", "An optional additional message to display with results"); |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| [RequireComponent (typeof(SpriteRenderer))] | |
| public class SpriteAnimator : MonoBehaviour | |
| { | |
| public List<Sprite> frames = new List<Sprite> (); | |
| public float fps = 15; |
| using UnityEngine; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| [RequireComponent (typeof(SpriteRenderer))] | |
| public class SpriteAnimator : MonoBehaviour | |
| { | |
| public List<Sprite> frames = new List<Sprite> (); | |
| public float fps = 15; |