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 attractorFlag : MonoBehaviour { | |
public enum FlagColor { Green, Red, Blue } | |
public FlagColor flagColor = FlagColor.Green; | |
public float speed = 0.0f; | |
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
public void SetLayerRecursively(GameObject go, int layerNumber) | |
{ | |
foreach (Transform trans in go.GetComponentsInChildren<Transform>(true)) | |
{ | |
trans.gameObject.layer = layerNumber; | |
} | |
} |
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
void OnPreRender() { | |
GL.wireframe = true; | |
} | |
void OnPostRender() { | |
GL.wireframe = false; | |
} |
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
#define GETSCREENMATRIX GLdouble m[16],l;glGetDoublev(GL_MODELVIEW_MATRIX,m);m[0] = m[5] = m[10] = 1.0;m[1] = m[2] = m[4] = m[6] = m[8] = m[9] = 0.0;glLoadMatrixd(m); |
NewerOlder