This file contains hidden or 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; | |
// @kurtdekker | |
// Place on a GameObject, set the desired rate of spin | |
public class SpinOnY : MonoBehaviour | |
{ | |
[Header( "Degrees per second.")] | |
public float RateOfRotation = 200.0f; |
This file contains hidden or 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; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
// @kurtdekker - ultra Cheesy grid with in-built editor for Unity3D | |
// | |
// To use: | |
// make an empty game object | |
// drag this script on it |
This file contains hidden or 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; | |
// @kurtdekker | |
// Make sure this is in an Editor folder! | |
public static class DuplicationHelpers | |
{ | |
// duplicates the current object and puts it back right after the original. | |
[MenuItem( "Assets/Dupe Here FFS")] |
This file contains hidden or 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; | |
// @kurtdekker | |
// | |
// For stopping your game during instantiated / enabled dialogs. | |
// | |
// To use: put this script on things that you want to | |
// stop your game action when they appear, like dialogs. | |
// | |
// You only need one instance of this script per dialog. |
This file contains hidden or 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; | |
// @kurtdekker | |
// | |
// from Unity forums: https://forum.unity.com/threads/logic-to-create-turns-of-attacks.1137946/ | |
// | |
// Rewriting AttackSequencingDemo as coroutines, as per GroZZler's suggestion. | |
// |
This file contains hidden or 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; | |
// @kurtdekker | |
// | |
// Hyper-cheesy non-aerodynamic flight controls | |
// | |
// To use: | |
// - slap this on your camera |
This file contains hidden or 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; | |
// @kurtdekker | |
// | |
// from Unity forums: https://forum.unity.com/threads/logic-to-create-turns-of-attacks.1137946/ | |
// | |
// goal: a random attack starts in 2-5 seconds, you have 1 second to defend against it | |
// |
This file contains hidden or 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 UnityEngine; | |
// @kurtdekker - delayed-activates things in your scene: | |
// To use: | |
// 1. put this script on fresh blank GameObject | |
// - NOT the same one that you are delayed-activating | |
// - NOT a child of the one(s) you are delayed-activating! | |
// - MAY be above other child GameObjects you activate (eg at top of hierarchy) | |
// 2. set the amount of delay in TimeToDelay field |
This file contains hidden or 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; | |
// @kurtdekker random spawn utilities from my Jetpack Kurt game (And other games) | |
public static class SpawnUtilities | |
{ | |
public static bool ProgressiveLiftAndCastDown( ref Vector3 position, out Vector3 normal) | |
{ | |
Vector3 pos = position; |
This file contains hidden or 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 MoteSystem : MonoBehaviour | |
{ | |
public Transform target; | |
System.Func<Vector3> GetPlayerVelocity; | |
const float limitDistance = 15.0f; | |
const int BASE_NUM_MOTES = 300; |