Added WallModel (ModelID=20) & CeilingModel (ModelID= 21)

This commit is contained in:
JappaWakka 2022-02-03 22:18:04 +01:00
parent b170071bf7
commit fbba01d0c4
5 changed files with 58 additions and 5 deletions

View File

@ -30725,6 +30725,8 @@
<Compile Include="Resources\FontManager.vb" />
<Compile Include="Resources\GameModeManager.vb" />
<Compile Include="Resources\ModelManager.vb" />
<Compile Include="Resources\Models\2D\CeilingModel.vb" />
<Compile Include="Resources\Models\2D\WallModel.vb" />
<Compile Include="Resources\Models\2D\BillModel.vb" />
<Compile Include="Resources\Models\2D\CrossModel.vb" />
<Compile Include="Resources\Models\2D\DoubleFloorModel.vb" />

View File

@ -0,0 +1,20 @@
Public Class CeilingModel
Inherits BaseModel
Public Sub New()
Me.ID = 21
Dim vertexData = New VertexPositionNormalTexture() {
New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), Vector3.Up, New Vector2(0, 1)),
New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, -0.5), Vector3.Up, New Vector2(0, 0)),
New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), Vector3.Up, New Vector2(1, 0)),
New VertexPositionNormalTexture(New Vector3(0.5, 0.5, -0.5), Vector3.Up, New Vector2(1, 0)),
New VertexPositionNormalTexture(New Vector3(0.5, 0.5, 0.5), Vector3.Up, New Vector2(1, 1)),
New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0.5), Vector3.Up, New Vector2(0, 1))
}
Setup(vertexData)
End Sub
End Class

View File

@ -0,0 +1,20 @@
Public Class BillModel
Inherits BaseModel
Public Sub New()
Me.ID = 3
Dim vertexData = New VertexPositionNormalTexture() {
New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0), Vector3.Backward, New Vector2(0, 1)),
New VertexPositionNormalTexture(New Vector3(-0.5, 0.5, 0), Vector3.Backward, New Vector2(0, 0)),
New VertexPositionNormalTexture(New Vector3(0.5, 0.5, 0), Vector3.Backward, New Vector2(1, 0)),
New VertexPositionNormalTexture(New Vector3(0.5, 0.5, 0), Vector3.Backward, New Vector2(1, 0)),
New VertexPositionNormalTexture(New Vector3(0.5, -0.5, 0), Vector3.Backward, New Vector2(1, 1)),
New VertexPositionNormalTexture(New Vector3(-0.5, -0.5, 0), Vector3.Backward, New Vector2(0, 1))
}
Setup(vertexData)
End Sub
End Class

View File

@ -98,6 +98,8 @@
Public Shared DiagonalWallModel As DiagonalWallModel = New DiagonalWallModel()
Public Shared HalfDiagonalWallModel As HalfDiagonalWallModel = New HalfDiagonalWallModel()
Public Shared OutsideStepModel As OutsideStepModel = New OutsideStepModel()
Public Shared WallModel As WallModel = New WallModel()
Public Shared CeilingModel As CeilingModel = New CeilingModel()
Public Shared Function getModelbyID(ByVal ID As Integer) As BaseModel
Select Case ID
@ -141,6 +143,10 @@
Return HalfDiagonalWallModel
Case 19
Return OutsideStepModel
Case 20
Return WallModel
Case 21
Return CeilingModel
Case Else
Return BlockModel
End Select

View File

@ -829,6 +829,15 @@
Dim Rotation As Vector3 = Entity.GetRotationFromInteger(CInt(GetTag(Tags, "Rotation")))
If TagExists(Tags, "RotationXYZ") = True Then
Dim rotationList As List(Of Single) = CType(GetTag(Tags, "RotationXYZ"), List(Of Single))
Rotation = New Vector3(rotationList(0), rotationList(1), rotationList(2))
End If
If ModelID = 21 Then
Rotation.Z += MathHelper.Pi
End If
Dim Visible As Boolean = True
If TagExists(Tags, "Visible") = True Then
Visible = CBool(GetTag(Tags, "Visible"))
@ -840,11 +849,7 @@
Shader = New Vector3(ShaderList(0), ShaderList(1), ShaderList(2))
End If
Dim RotationXYZ As Vector3 = Nothing
If TagExists(Tags, "RotationXYZ") = True Then
Dim rotationList As List(Of Single) = CType(GetTag(Tags, "RotationXYZ"), List(Of Single))
Rotation = New Vector3(rotationList(0), rotationList(1), rotationList(2))
End If
Dim SeasonTexture As String = ""
If TagExists(Tags, "SeasonTexture") = True Then