slimecing

a fighting game featuring slimes and swords
Log | Files | Refs | README

Example.cs (3075B)


      1 using UnityEngine;
      2 using System.Collections;
      3 
      4 public class Example : MonoBehaviour {
      5 	
      6 	//float
      7 	public bool debugPoint;
      8 	public Vector3 debugPoint_Position;
      9 	public float debugPoint_Scale;
     10 	public Color debugPoint_Color;
     11 	
     12 	//vector3
     13 	public bool debugBounds;
     14 	public Vector3 debugBounds_Position;
     15 	public Vector3 debugBounds_Size;
     16 	public Color debugBounds_Color;
     17 	
     18 	//float, vector3
     19 	public bool debugCircle;
     20 	public Vector3 debugCircle_Up;
     21 	public float debugCircle_Radius;
     22 	public Color debugCircle_Color;
     23 	
     24 	//float
     25 	public bool debugWireSphere;
     26 	public float debugWireSphere_Radius;
     27 	public Color debugWireSphere_Color;
     28 	
     29 	//vector3, float
     30 	public bool debugCylinder;
     31 	public Vector3 debugCylinder_End;
     32 	public float debugCylinder_Radius;
     33 	public Color debugCylinder_Color;
     34 	
     35 	//vector3, float
     36 	public bool debugCone;
     37 	public Vector3 debugCone_Direction;
     38 	public float debugCone_Angle;
     39 	public Color debugCone_Color;
     40 	
     41 	//vector3
     42 	public bool debugArrow;
     43 	public Vector3 debugArrow_Direction;
     44 	public Color debugArrow_Color;
     45 	
     46 	//vector3, float
     47 	public bool debugCapsule;
     48 	public Vector3 debugCapsule_End;
     49 	public float debugCapsule_Radius;
     50 	public Color debugCapsule_Color;
     51 	
     52 	void OnDrawGizmos()
     53 	{	
     54 		if(debugPoint) DebugExtension.DrawPoint(debugPoint_Position, debugPoint_Color, debugPoint_Scale);
     55 		if(debugBounds) DebugExtension.DrawBounds(new Bounds(new Vector3(10, 0, 0), debugBounds_Size), debugBounds_Color);
     56 		if(debugCircle) DebugExtension.DrawCircle(new Vector3(20, 0, 0), debugCircle_Up, debugCircle_Color, debugCircle_Radius);
     57 		if(debugWireSphere)
     58 		{
     59 			Gizmos.color = debugWireSphere_Color;
     60 			Gizmos.DrawWireSphere(new Vector3(30, 0, 0), debugWireSphere_Radius);
     61 		}
     62 		if(debugCylinder) DebugExtension.DrawCylinder(new Vector3(40, 0, 0), debugCylinder_End, debugCylinder_Color, debugCylinder_Radius);
     63 		if(debugCone) DebugExtension.DrawCone(new Vector3(50, 0, 0), debugCone_Direction, debugCone_Color, debugCone_Angle);
     64 		if(debugArrow) DebugExtension.DrawArrow(new Vector3(60, 0, 0), debugArrow_Direction, debugArrow_Color);
     65 		if(debugCapsule) DebugExtension.DrawCapsule(new Vector3(70, 0, 0), debugCapsule_End, debugCapsule_Color, debugCapsule_Radius);
     66 
     67 	}
     68 	
     69 	// Update is called once per frame
     70 	void Update () 
     71 	{
     72 		DebugExtension.DebugPoint(debugPoint_Position, debugPoint_Color, debugPoint_Scale);
     73 		DebugExtension.DebugBounds(new Bounds(new Vector3(10, 0, 0), debugBounds_Size), debugBounds_Color);
     74 		DebugExtension.DebugCircle(new Vector3(20, 0, 0), debugCircle_Up, debugCircle_Color, debugCircle_Radius);
     75 		DebugExtension.DebugWireSphere(new Vector3(30, 0, 0), debugWireSphere_Color, debugWireSphere_Radius);
     76 		DebugExtension.DebugCylinder(new Vector3(40, 0, 0), debugCylinder_End, debugCylinder_Color, debugCylinder_Radius);
     77 		DebugExtension.DebugCone(new Vector3(50, 0, 0), debugCone_Direction, debugCone_Color, debugCone_Angle);
     78 		DebugExtension.DebugArrow(new Vector3(60, 0, 0), debugArrow_Direction, debugArrow_Color);
     79 		DebugExtension.DebugCapsule(new Vector3(70, 0, 0), debugCapsule_End, debugCapsule_Color, debugCapsule_Radius);
     80 	}
     81 }