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 TriggerCallback : MonoBehaviour { | |
public delegate void Enter(Collider other); | |
public Enter enter; | |
public delegate void Exit(Collider other); | |
public Exit exit; | |
public delegate void Stay(Collider other); | |
public Stay stay; |
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; | |
public class ColliderCallback : MonoBehaviour { | |
public delegate void Enter(Collision other); | |
public Enter enter; | |
public delegate void Exit(Collision other); | |
public Exit exit; | |
public delegate void Stay(Collision other); | |
public Stay stay; |
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; | |
using System.Collections; | |
public class TriggerEvent : MonoBehaviour { | |
public bool EnterOnce; | |
bool enterFire; | |
public UnityEvent EnterEvent; | |
public bool StayOnce; | |
bool stayFire; |
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
/* | |
MIT License | |
Copyright 2017 Digital Precept LLC | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOF |
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
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.image.BufferedImage; | |
import java.io.File; | |
import java.io.IOException; | |
import javax.imageio.ImageIO; | |
public class TriGridImage { |
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; | |
using UnityEngine.UI; | |
using UnityEngine.Events; | |
using UnityEngine.EventSystems; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
[CustomEditor(typeof(ToggleSlider))] | |
public class ToggleSliderEditor : Editor{ |
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
/* | |
From https://forum.unity.com/threads/will-unity-ever-make-a-move-to-async-await-task.557908/#post-3699391 | |
Full credit to james7132 | |
*/ | |
public static class IAsyncOperationExtensions { | |
public static AsyncOperationAwaiter GetAwaiter(this IAsyncOperation operation) { | |
return new AsyncOperationAwaiter(operation); | |
} |
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 static class ExtendedLerp { | |
public static Vector3 EaseOut(Vector3 start, Vector3 end, float t){ | |
t = Mathf.Sin(t * Mathf.PI * 0.5f); | |
return Vector3.Lerp(start,end,t); | |
} |
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
https://mega.nz/file/jA8Tjaib#l96rAWdJ5IOvTf7jSGtCNND4tIL4AzOxmYt4mF59TCE |
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; | |
/// <summary> | |
/// A thin wrapper for easily Playing specific animations. And checking if the animation is currently playing | |
/// </summary> | |
public class AnimatorController : MonoBehaviour | |
{ | |
Animator _animator; | |
public Animator animator=>_animator; |
OlderNewer