Survivalcraft API 1.8.2.3
v1.8.2.3
Survivalcraft 2.4
载入中...
搜索中...
未找到
SubsystemCraftingTableBlockBehavior.cs
浏览该文件的文档.
1
using
TemplatesDatabase
;
2
3
namespace
Game
{
4
public
class
SubsystemCraftingTableBlockBehavior
:
SubsystemEntityBlockBehavior
{
5
public
override
int
[]
HandledBlocks
=> [27];
6
7
public
override
void
Load
(
ValuesDictionary
valuesDictionary) {
8
base.Load(valuesDictionary);
9
m_databaseObject
=
Project
.GameDatabase.Database.FindDatabaseObject(
"CraftingTable"
,
Project
.GameDatabase.EntityTemplateType,
true
);
10
}
11
12
public
override
bool
InteractBlockEntity
(
ComponentBlockEntity
blockEntity,
ComponentMiner
componentMiner) {
13
if
(blockEntity !=
null
14
&& componentMiner.
ComponentPlayer
!=
null
) {
15
ComponentCraftingTable
componentCraftingTable = blockEntity.
Entity
.
FindComponent
<
ComponentCraftingTable
>(
true
);
16
componentMiner.ComponentPlayer.ComponentGui.ModalPanelWidget =
new
CraftingTableWidget
(
17
componentMiner.
Inventory
,
18
componentCraftingTable
19
);
20
AudioManager
.
PlaySound
(
"Audio/UI/ButtonClick"
, 1f, 0f, 0f);
21
return
true
;
22
}
23
return
false
;
24
}
25
}
26
}
Game.AudioManager
定义
AudioManager.cs:5
Game.AudioManager.PlaySound
static void PlaySound(string name, float volume, float pitch, float pan)
定义
AudioManager.cs:8
Game.ComponentBlockEntity
定义
ComponentBlockEntity.cs:6
Game.ComponentCraftingTable
定义
ComponentCraftingTable.cs:7
Game.ComponentMiner
定义
ComponentMiner.cs:7
Game.ComponentMiner.ComponentPlayer
ComponentPlayer ComponentPlayer
定义
ComponentMiner.cs:57
Game.ComponentMiner.Inventory
IInventory Inventory
定义
ComponentMiner.cs:61
Game.CraftingTableWidget
定义
CraftingTableWidget.cs:5
Game.SubsystemCraftingTableBlockBehavior
定义
SubsystemCraftingTableBlockBehavior.cs:4
Game.SubsystemCraftingTableBlockBehavior.InteractBlockEntity
override bool InteractBlockEntity(ComponentBlockEntity blockEntity, ComponentMiner componentMiner)
定义
SubsystemCraftingTableBlockBehavior.cs:12
Game.SubsystemCraftingTableBlockBehavior.HandledBlocks
override int[] HandledBlocks
定义
SubsystemCraftingTableBlockBehavior.cs:5
Game.SubsystemCraftingTableBlockBehavior.Load
override void Load(ValuesDictionary valuesDictionary)
定义
SubsystemCraftingTableBlockBehavior.cs:7
Game.SubsystemEntityBlockBehavior
定义
SubsystemEntityBlockBehavior.cs:6
Game.SubsystemEntityBlockBehavior.m_databaseObject
DatabaseObject m_databaseObject
定义
SubsystemEntityBlockBehavior.cs:15
GameEntitySystem.Component.Entity
Entity Entity
定义
Component.cs:14
GameEntitySystem.Entity.FindComponent
Component FindComponent(Type type, string name, bool throwOnError)
定义
Entity.cs:132
GameEntitySystem.Subsystem.ValuesDictionary
ValuesDictionary ValuesDictionary
定义
Subsystem.cs:12
GameEntitySystem.Subsystem.Project
Project Project
定义
Subsystem.cs:10
Game
定义
ContentFileBridge.cs:4
TemplatesDatabase
定义
Database.cs:6
SurvivalcraftApi 1.8.2.3
Survivalcraft.Windows
Subsystem
SubsystemCraftingTableBlockBehavior.cs
制作者
1.16.1