22 lines
399 B
C#
22 lines
399 B
C#
using UnityEngine;
|
|
using UnityEditor;
|
|
using System.Collections;
|
|
|
|
[ExecuteInEditMode]
|
|
public class CarDebug : MonoBehaviour {
|
|
public bool showTorquePlot = true;
|
|
public bool showHpPlot = true;
|
|
|
|
void OnDrawGizmosSelected(){
|
|
if (enabled) {
|
|
var car = GetComponent<Car> ();
|
|
if (car != null) {
|
|
if(car.engine != null){
|
|
Handles.BeginGUI ();
|
|
Handles.EndGUI ();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|