Update TurningSign entity rotation speed system
This commit is contained in:
parent
52f900291f
commit
9d5411986f
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
Inherits Entity
|
Inherits Entity
|
||||||
|
|
||||||
Dim TurningSpeed As Single = 0.01F
|
Dim TurningSpeed As Single = 1 / 100 * MathHelper.Pi
|
||||||
|
|
||||||
Public Overrides Sub Initialize()
|
Public Overrides Sub Initialize()
|
||||||
MyBase.Initialize()
|
MyBase.Initialize()
|
||||||
|
@ -18,12 +18,17 @@
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
If StringHelper.IsNumeric(Me.AdditionalValue) = True Then
|
If StringHelper.IsNumeric(Me.AdditionalValue) = True Then
|
||||||
Me.TurningSpeed = CSng(CInt(Me.AdditionalValue) / 100)
|
Me.TurningSpeed = CSng(CInt(Me.AdditionalValue) / 100 * MathHelper.Pi)
|
||||||
End If
|
End If
|
||||||
Me.CreateWorldEveryFrame = True
|
Me.CreateWorldEveryFrame = True
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Overrides Sub UpdateEntity()
|
Public Overrides Sub UpdateEntity()
|
||||||
|
If Me.TurningSpeed <> CSng(CInt(Me.AdditionalValue) / 100 * MathHelper.Pi) Then
|
||||||
|
If StringHelper.IsNumeric(Me.AdditionalValue) = True Then
|
||||||
|
Me.TurningSpeed = CSng(CInt(Me.AdditionalValue) / 100 * MathHelper.Pi)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
Select Case Me.ActionValue
|
Select Case Me.ActionValue
|
||||||
Case 1
|
Case 1
|
||||||
Me.Rotation.X += TurningSpeed
|
Me.Rotation.X += TurningSpeed
|
||||||
|
|
Loading…
Reference in New Issue