Files
2025-05-13 03:19:28 +03:00

62 lines
1.2 KiB
C#

using UnityEngine;
using System.Collections;
public class Differential : MonoBehaviour {
public float gearRatio = 3.5f;
public DriveShaft left;
public DriveShaft right;
public DriveShaft center;
// Use this for initialization
void Start () {
/*if (left != null) {
left.target = this;
}
if (right != null) {
right.target = this;
}
if (center != null) {
center.target = this;
}*/
}
// Update is called once per frame
void Update () {
}
/*
void OnDrawGizmos(){
AdvancedGizmo.DrawCircle (transform.position, Vector3.up, 0.2f, Color.green, 12, false, 1);
Gizmos.color = Color.red;
if (left != null) {
Gizmos.DrawLine(left.transform.position, gameObject.transform.position);
}
if (right != null) {
Gizmos.DrawLine(right.transform.position, gameObject.transform.position);
}
if (center != null) {
Gizmos.color = Color.blue;
Gizmos.DrawLine(center.transform.position, gameObject.transform.position);
}
var pt = Tools.WorldToGuiPoint (transform.position);
if (pt.z > 0) {
Tools.BeginGui ();
var textRect = new Rect (pt.x, pt.y, 100, 20);
Tools.DrawRectangle(textRect, new Color(0,0,0,0.7f));
GUI.Label (textRect, "Gear: " + gearRatio);
Tools.EndGui ();
}
}*/
}