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
[RequireComponent(typeof(Rigidbody2D))] | |
public abstract class TimeDilated : MonoBehaviour | |
{ | |
private float _time = 0; | |
public float localTime { get{ return _time; } set{_time = value;} } | |
public Vector2 velocity; | |
protected Vector2 _dilationForce = Vector2.zero; //acceleration | |
public Vector2 acceleration{ get{ return _dilationForce; } set { _dilationForce = value; } } |
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 UnityEngine; | |
using System.Collections; | |
public class Grid : MonoBehaviour | |
{ | |
public static float gridSize = 0.5f; | |
public static Vector2 ToGrid( Vector2 point ) | |
{ | |
float xStep = Mathf.Floor((point.x / gridSize) + 0.5f); |
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
/* ==================================================== | |
* Company: Unity Technologies | |
* Author: Rickard Andersson, rickard@unity3d.com | |
* ==================================================== | |
* Modified by : Halvor Smedås, stektpotet@gmail.com | |
* ==================================================== */ | |
/*Fix for bottom part of the page, as pointed out by /u/EristicEscalator. Thanks!*/ | |
body { background-color: #1E1E1E; } |
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 UnityEngine; | |
using System; | |
/// <summary> | |
/// All scripted behaviour that needs access to internal components should inherit from this. | |
/// </summary> | |
public abstract class ScriptedBehaviour : MonoBehaviour | |
{ | |
/// <summary> | |
/// Requires a component from the gameobject currently beeing scripted | |
/// without the need for constant use of GetComponent or messy inspectors |
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 UnityEngine; | |
using System; | |
/// <summary> | |
/// All scripted behaviour that needs access to internal components should inherit from this. | |
/// </summary> | |
public static class ExtensionMethods | |
{ | |
/// <summary> | |
/// Requires a component from the gameobject currently beeing scripted | |
/// without the need for constant use of GetComponent or messy inspectors |
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 UnityEngine; | |
using UnityEditor; | |
using System.Reflection; | |
using System; | |
namespace EditorAttributes | |
{ | |
[CustomPropertyDrawer(typeof(ButtonAttribute))] | |
public class ButtonDrawer : PropertyDrawer | |
{ |
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 "Custom/StandardVertex" { | |
Properties { | |
_Color ("ColorTint", Color) = (1,1,1) | |
_Glossiness ("Smoothness", Range(0,1)) = 0.5 | |
_Metallic ("Metallic", Range(0,1)) = 0.0 | |
} | |
SubShader { | |
Tags { "RenderType"="Opaque" } | |
LOD 200 | |
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; | |
using System.Collections.Generic; | |
using UnityEngine; | |
namespace LowPolySystems | |
{ | |
[System.Serializable] | |
[CreateAssetMenu( fileName = "default blends", menuName = "wat")] | |
public class BlendMode : ScriptableObject | |
{ |
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 UnityEngine; | |
using UnityEngine.Events; | |
public abstract class Trigger : MonoBehaviour { | |
public LayerMask activatorLayers; | |
[SerializeField] | |
private bool explicitActivator; | |
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; | |
using UnityEngine; | |
using UnityEngine.Events; | |
namespace HumanAPI | |
{ | |
[RequireComponent(typeof(Collider))] | |
public class Trigger : MonoBehaviour | |
{ |
OlderNewer