SModularVehicle
في هذا الصنفForceSetOwner
| دالة | ForceSetOwner | Force player of the id owned this vehicle, but only between this spawned vehicle. |
| دالة | ForceActivate | Force player drive on this vehicle |
| دالة | ForceDeactivate | Force player out of the vehicle. |
| دالة | SuppressTimeout | Disable the vehicle automatic respawn |
| دالة | OverrideOnClick | Add onClick method to this vehicle,onClick have to be a closure. |
| خاصية | VerticalInput | Force vertical offset value, it would be added to vertical control and never set to zero. |
| خاصية | HorizontalInput | Force horizontal offset value, it would be added to horizontal control and never set to zero. |
| خاصية | StrafeInput | Force strafe offset value,it would be added to strafe control and never set to zero. |
| خاصية | DepthInput | Force depth offset value, it would be added to depth control and never set to zero. |
| خاصية | IgnoreUserInput | If this option is enabled, user input would be ignored until disable this. |
| خاصية | Driver | Get the player avatar component. |
| خاصية | GameObject | Returns the GameObject of this Vehicle component. |
الدوال
ForceSetOwner
Force player of the id owned this vehicle, but only between this spawned vehicle. But it seems the new owner can’t drive on this vehicle.
المعاملات
| الاسم | النوع | القيمة الافتراضية |
|---|---|---|
| newOwner | int | – |
| vehicleId | int | – |
القيم المرجعة
void
مثال
Space.Host.ExecutingObject.Vehicle.ForceSetOwner(AvatarID)
ForceActivate
Force player drive on this vehicle
القيم المرجعة
void
مثال
Space.Host.ExecutingObject.Vehicle.ForceActivate()
ForceDeactivate
Force player out of the vehicle.
القيم المرجعة
void
مثال
Space.Host.ExecutingObject.Vehicle.ForceDeactivate()
SuppressTimeout
Disable the vehicle automatic respawn
القيم المرجعة
void
مثال
Space.Host.ExecutingObject.Vehicle.SuppressTimeout()
OverrideOnClick
Add onClick method to this vehicle,onClick have to be a closure.
المعاملات
| الاسم | النوع | القيمة الافتراضية |
|---|---|---|
| onClick | Closure | – |
القيم المرجعة
void
مثال
Space.Host.ExecutingObject.Vehicle.OverrideOnClick(NewOnClickFunction)
الخصائص
VerticalInput
Force vertical offset value, it would be added to vertical control and never set to zero.
مثال
Space.Host.ExecutingObject.Vehicle.VerticalInput = 0.5
HorizontalInput
Force horizontal offset value, it would be added to horizontal control and never set to zero.
مثال
Space.Host.ExecutingObject.Vehicle.HorizontalInput = 0.5
StrafeInput
Force strafe offset value,it would be added to strafe control and never set to zero.
مثال
Space.Host.ExecutingObject.Vehicle.StrafeInput = 0.5
DepthInput
Force depth offset value, it would be added to depth control and never set to zero.
مثال
Space.Host.ExecutingObject.Vehicle.DepthInput = 0.5
IgnoreUserInput
If this option is enabled, user input would be ignored until disable this.
مثال
Space.Host.ExecutingObject.Vehicle.IgnoreUserInput = true
Driverللقراءة فقط
Get the player avatar component.
مثال
DriverAvatar = Space.Host.ExecutingObject.Vehicle.Driver
GameObjectللقراءة فقط
Returns the GameObject of this Vehicle component.
مثال
VehicleGameObject = Space.Host.ExecutingObject.Vehicle.GameObject



