Survivalcraft API 1.8.2.3
v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
StickBlock.cs
浏览该文件的文档.
1
using
Engine
;
2
using
Engine.Graphics
;
3
4
namespace
Game
{
5
public
class
StickBlock
:
Block
{
6
public
static
int
Index
= 23;
7
8
public
BlockMesh
m_standaloneBlockMesh
=
new
();
9
10
public
override
void
Initialize
() {
11
Model
model =
ContentManager
.
Get
<
Model
>(
"Models/Stick"
);
12
Matrix
boneAbsoluteTransform =
BlockMesh
.
GetBoneAbsoluteTransform
(model.
FindMesh
(
"Stick"
).
ParentBone
);
13
m_standaloneBlockMesh
.AppendModelMeshPart(
14
model.
FindMesh
(
"Stick"
).
MeshParts
[0],
15
boneAbsoluteTransform *
Matrix
.
CreateTranslation
(0f, -0.5f, 0f),
16
false
,
17
false
,
18
false
,
19
false
,
20
Color
.
White
21
);
22
base.Initialize();
23
}
24
25
public
override
void
GenerateTerrainVertices
(
BlockGeometryGenerator
generator,
TerrainGeometry
geometry,
int
value,
int
x,
int
y,
int
z) { }
26
27
public
override
void
DrawBlock
(
PrimitivesRenderer3D
primitivesRenderer,
28
int
value,
29
Color
color,
30
float
size,
31
ref
Matrix
matrix,
32
DrawBlockEnvironmentData
environmentData) {
33
BlocksManager
.
DrawMeshBlock
(primitivesRenderer,
m_standaloneBlockMesh
, color, 2f * size, ref matrix, environmentData);
34
}
35
}
36
}
Engine.Graphics.Model
定义
Model.cs:4
Engine.Graphics.Model.FindMesh
ModelMesh FindMesh(string name, bool throwIfNotFound=true)
定义
Model.cs:28
Engine.Graphics.ModelMesh.ParentBone
ModelBone ParentBone
定义
ModelMesh.cs:9
Engine.Graphics.ModelMesh.MeshParts
ReadOnlyList< ModelMeshPart > MeshParts
定义
ModelMesh.cs:16
Engine.Graphics.PrimitivesRenderer3D
定义
PrimitivesRenderer3D.cs:4
Game.BlockGeometryGenerator
定义
BlockGeometryGenerator.cs:4
Game.Block
定义
Block.cs:5
Game.BlockMesh
定义
BlockMesh.cs:7
Game.BlockMesh.GetBoneAbsoluteTransform
static Matrix GetBoneAbsoluteTransform(ModelBone modelBone)
定义
BlockMesh.cs:37
Game.BlocksManager
定义
BlocksManager.cs:10
Game.BlocksManager.DrawMeshBlock
static void DrawMeshBlock(PrimitivesRenderer3D primitivesRenderer, BlockMesh blockMesh, float size, ref Matrix matrix, DrawBlockEnvironmentData environmentData)
定义
BlocksManager.cs:829
Game.ContentManager
定义
ContentManager.cs:50
Game.ContentManager.Get
static object Get(Type type, string name)
定义
ContentManager.cs:70
Game.DrawBlockEnvironmentData
定义
DrawBlockEnvironmentData.cs:5
Game.StickBlock
定义
StickBlock.cs:5
Game.StickBlock.GenerateTerrainVertices
override void GenerateTerrainVertices(BlockGeometryGenerator generator, TerrainGeometry geometry, int value, int x, int y, int z)
定义
StickBlock.cs:25
Game.StickBlock.m_standaloneBlockMesh
BlockMesh m_standaloneBlockMesh
定义
StickBlock.cs:8
Game.StickBlock.Initialize
override void Initialize()
定义
StickBlock.cs:10
Game.StickBlock.Index
static int Index
定义
StickBlock.cs:6
Game.StickBlock.DrawBlock
override void DrawBlock(PrimitivesRenderer3D primitivesRenderer, int value, Color color, float size, ref Matrix matrix, DrawBlockEnvironmentData environmentData)
定义
StickBlock.cs:27
Game.TerrainGeometry
定义
TerrainGeometry.cs:5
Engine.Graphics
定义
BaseBatch.cs:1
Engine
定义
BaseSound.cs:10
Game
定义
ContentFileBridge.cs:4
Engine.Color
定义
Color.cs:2
Engine.Color.White
static Color White
定义
Color.cs:15
Engine.Matrix
定义
Matrix.cs:17
Engine.Matrix.CreateTranslation
static Matrix CreateTranslation(float x, float y, float z)
定义
Matrix.cs:580
SurvivalcraftApi 1.8.2.3
Survivalcraft.Windows
Block
StickBlock.cs
制作者
1.16.1