protected ObjectController(ObjectPart part, UUID sceneID, SceneInterface.LocationInfoProvider locInfoProvider) { SceneID = sceneID; m_StateData = new PhysicsStateData(part, sceneID); m_Part = part; m_Vehicle = part.VehicleParams.GetMotor(); LocationInfoProvider = locInfoProvider; }
public VehicleInstance(UUID sceneID) { GravityConstant = 9.81; Mass = 1; m_VehicleParams = new VehicleParams(new ObjectPart()); m_PhysicsState = m_PhysicsState = new PhysicsStateData(new VehicleObject(), sceneID); m_VehicleMotor = m_VehicleParams.GetMotor(); Init(); }
public virtual void Init() { motor = GetComponent <VehicleMotor>(); body = GetComponent <Rigidbody>(); raceManager = GameObject.Find("RaceManager").GetComponent <RaceManager>(); NextCheckPoint = raceManager.GetNextCheckPoint(this); OnNextCheckPoint(); if (raceManager != null && !raceManager.bRaceComplete) { raceManager.AddCar(this); } }
void Start() { motor = GetComponent< VehicleMotor >(); }
private void Start() { motor = GetComponent <VehicleMotor>(); }
void Start() { tilt = GetComponent< TiltReader >(); motor = GetComponent< VehicleMotor >(); }