You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Before you begin, it is recommended to read the [wiki](https://github.com/HaxeFoundation/hashlink/wiki)to understand the basics of the **HashLink virtual machine**.
Although you will be writing the **Mod**in**C#**, remember that **Dead Cells**is written in **Haxe**and runs on the **HashLink virtual machine**, not the **.NET virtual machine**.
12
12
13
-
本教程假设你拥有以下技能:
13
+
This tutorial assumes you have the following skills:
14
14
15
-
- C# 编程基础
16
-
- Dead Cells 基础 Mod 制作 ([教程](https://www.bilibili.com/opus/681293864647000128))
15
+
-Basic C# programming
16
+
-Basic Dead Cells mod creation ([Tutorial](https://www.bilibili.com/opus/681293864647000128))
Before you begin, it is recommended to read the [wiki](https://github.com/HaxeFoundation/hashlink/wiki)to understand the basics of the **HashLink virtual machine**.
23
23
24
24
:::
25
25
26
26
:::info
27
-
本教程的 Mod 代码储存在 [Github](https://github.com/dead-cells-core-modding/docs-zh/blob/main/modproject/FirstDeadCellsMod) 上。
27
+
The mod code for this tutorial is stored on [Github](https://github.com/dead-cells-core-modding/docs-zh/blob/main/modproject/FirstDeadCellsMod).
28
28
:::
29
29
30
-
## 创建 Mod 项目
30
+
## Creating the Mod Project
31
31
32
-
-打开命令行工具
33
-
-创建一个新的库项目:
32
+
-Open your command-line tool.
33
+
-Create a new class library project:
34
34
35
35
```bash
36
36
dotnet new classlib -n FirstDeadCellsMod -f net9.0
37
37
```
38
38
39
-
-进入项目目录:
39
+
-Navigate into the project directory:
40
40
41
41
```bash
42
42
cd FirstDeadCellsMod
43
43
```
44
44
45
-
-添加 Dead Cells Modding MDK 的NuGet包引用:
45
+
-Add a reference to the Dead Cells Modding MDK NuGet package:
46
46
47
47
```bash
48
48
dotnet add package DeadCellsCoreModding.MDK
49
49
```
50
50
51
-
## 创建 Mod 主类文件
51
+
## Creating the Mod's Main Class File
52
52
53
-
创建 Mod 主类文件`ModEntry.cs`:
53
+
Create the mod's main class file, `ModEntry.cs`:
54
54
55
55
```csharp
56
56
usingModCore.Events.Interfaces.Game;
@@ -67,81 +67,79 @@ namespace FirstDeadCellsMod
67
67
}
68
68
publicoverridevoidInitialize()
69
69
{
70
-
Logger.Information("你好,世界");
70
+
Logger.Information("Hello, World");
71
71
}
72
72
73
73
void IOnGameExit.OnGameExit()
74
74
{
75
-
Logger.Information("游戏正在退出");
75
+
Logger.Information("The game is exiting");
76
76
}
77
77
}
78
78
}
79
79
```
80
80
81
-
## 配置 Mod 项目
81
+
## Configuring the Mod Project
82
82
83
-
编辑项目文件`FirstDeadCellsMod.csproj`,添加以下内容:
83
+
Edit the project file, `FirstDeadCellsMod.csproj`, and add the following content:
0 commit comments