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 ProgressiveLookAt : MonoBehaviour | |
{ | |
Transform _origin; // itself | |
//LOOK AT | |
public float lookSpeed = 1f; // with target ref | |
public Transform target; |
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; | |
using System.Collections.Generic; | |
public class MouseCrosshair : MonoBehaviour { | |
protected int cursorState = 0; // index of states[] to draw on screen | |
protected int cursorSizeX = 16; | |
protected int cursorSizeY = 16; |
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; | |
using System.Collections.Generic; | |
public class UnityTools { | |
static public Transform fetchInChildren(Transform parent, string partName){ | |
foreach(Transform t in parent){ | |
if(t.name.IndexOf(partName) > -1) return t; | |
Transform child = fetchInChildren(t, partName); |
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
#region Easing Curves | |
private float linear(float start, float end, float value){ | |
return Mathf.Lerp(start, end, value); | |
} | |
private float clerp(float start, float end, float value){ | |
float min = 0.0f; | |
float max = 360.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 System.IO; | |
public class SystemIOTools { | |
//https://msdn.microsoft.com/en-us/library/vstudio/cc148994%28v=vs.100%29.aspx | |
static public void copyFolderToFolder(string sourcePath, string targetPath){ | |
if (!System.IO.Directory.Exists(targetPath)) | |
{ | |
System.IO.Directory.CreateDirectory(targetPath); |
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 FpsWarning : MonoBehaviour { | |
int fps = 0; | |
public int monitorValue = 60; | |
GUIStyle style; | |
void OnGUI(){ |
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; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
public class FbxImporter : AssetPostprocessor { | |
void OnPreprocessModel() { | |
ModelImporter model = (ModelImporter)assetImporter; | |
model.addCollider = true;// This tells it to add a collider to the object |
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 GameTime : MonoBehaviour { | |
public static GameTime manager; | |
public float timeScale = 1; | |
float elapsedTime; | |
public static float deltaTime; | |
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
package; | |
import flixel.FlxG; | |
import flixel.FlxSprite; | |
import flixel.group.FlxGroup; | |
import flixel.util.FlxColor; | |
import flash.display.BitmapData; | |
/** | |
* ... | |
* @author a.berlemont |
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
package | |
{ | |
import flash.display.Stage; | |
import flash.events.Event; | |
import flash.utils.getTimer; | |
/** | |
* ... | |
* @author ... | |
*/ | |
public class Time |
NewerOlder