Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

Commit 15253a4

Browse files
authored
Merge pull request #122 from Demonmasterlqx/main
add src
2 parents 4b16837 + 8df47be commit 15253a4

File tree

14 files changed

+1371
-1
lines changed

14 files changed

+1371
-1
lines changed

teams/天地一!屋!大爱盟/README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,10 @@
2929

3030
拾取后发射一段时间的高伤害高爆弹
3131

32-
## 游戏有很多其他的“特性”建议自行游玩查看QWQ
32+
## 游戏有很多其他的“特性”建议自行游玩查看QWQ
33+
34+
## 宣传链接
35+
36+
[Moonbit初体验——大一小白游戏创作 - Daster的文章 - 知乎](https://zhuanlan.zhihu.com/p/6863463180)
37+
38+
[天地一!屋!大爱盟——飞机大战 at moonbit 开发心得 - 轩Demonmaster - 博客园](https://www.cnblogs.com/LQX-OI/p/18540898)

teams/天地一!屋!大爱盟/src/antity/antity_memory.mbt

Lines changed: 431 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"import": [
3+
"moonbitlang/wasm4",
4+
"GAME/time_cnt",
5+
"GAME/bitset"
6+
]
7+
}
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
pub struct Location{
2+
mut x:Double
3+
mut y:Double
4+
// mut newx:Double
5+
// mut newy:Double
6+
type_:UInt
7+
//用于记录实体的位置
8+
}
9+
10+
// struct Sprite_parameter{
11+
// x:UInt
12+
// y:UInt
13+
// //相对于基准像素的偏移量
14+
// color:UInt
15+
// }
16+
17+
// pub struct Frame{
18+
// mut x:Int
19+
// mut y:Int
20+
// //代表左上角的基准像素
21+
// sprite:Array[Sprite_parameter]
22+
// //这个代表一帧!!
23+
// }
24+
25+
pub struct Frame_time_config{
26+
mut begin:Int
27+
mut end:Int
28+
}
29+
30+
pub struct Frame_effects{
31+
xlen:UInt
32+
ylen:UInt
33+
sprite:@bitset.Bitset
34+
back_ground:@bitset.Bitset
35+
}
36+
37+
pub struct Frame_effects_{
38+
mut begin:UInt
39+
xlen:UInt
40+
ylen:UInt
41+
sprite:Array[@bitset.Bitset]
42+
back_ground:Array[@bitset.Bitset]
43+
}
44+
45+
// pub struct Frame_effects_{
46+
// mut begin_time:UInt64
47+
// mut end_time:UInt64
48+
// mut x:UInt
49+
// mut y:UInt
50+
// sprite:Array[Frame]
51+
// time_management:Array[Frame_time_config]
52+
// //time_management与sprite的长度一致,time_management用于控制sprite的每一帧显示时间
53+
// }
54+
55+
pub struct ToneParams {
56+
frequency: (UInt, UInt)
57+
adsr: @wasm4.ADSR
58+
volume: @wasm4.ADSRVolume
59+
channel: @wasm4.ToneFlag
60+
}
61+
62+
pub struct Sound_effects{
63+
//具体实现待研究QWQ
64+
effects:Array[ToneParams]
65+
}
66+
pub struct ToneForPub {
67+
tone:ToneParams
68+
startfps:UInt
69+
}
70+
// pub struct Effects{
71+
// frame:Frame_effects_
72+
// sound:Array[ToneParams]
73+
// }
74+
75+
pub struct Bullet{
76+
type_:Int
77+
harm:Double
78+
pos:Location
79+
dir:Double
80+
speed:Double
81+
// frame:Frame_effects
82+
}
83+
84+
// pub struct Laser{
85+
// type_:UInt
86+
// pos:Location
87+
// //表示激光最顶点的位置
88+
// dir:UInt
89+
// //激光方向
90+
// harm:UInt
91+
// // warming:Frame_effects
92+
93+
// }
94+
//激光应当还有一个方向改变函数!!!
95+
96+
pub struct Bullet_exit_point{
97+
x:Int
98+
y:Int
99+
type_:Int
100+
mut last_shoot:Int
101+
shoot_speed:Int
102+
mut limit:Int
103+
}
104+
105+
pub struct Aircraft{
106+
type_:Int
107+
pos:Location
108+
mut speed:Double
109+
mut dir:Double
110+
// frame:Frame_effects
111+
mut hp:Double
112+
bullet_exit_point:Array[Bullet_exit_point]
113+
}
114+
//方向先不管,是个角度,0度方向与x轴正方向平行,顺时针转
115+
//weapon 1是单发 2是双发
116+
//speed 是每帧速度
117+
pub struct Cartridge{
118+
type_:Int
119+
pos:Location
120+
mut speed:Double
121+
dir:Double
122+
effect:Double
123+
// frame:Frame_effects
124+
}
125+
126+
// type_ 分配规则
127+
// 普通子弹_敌人 1
128+
// 普通子弹_自己 9
129+
// 高爆子弹_自己 2
130+
// 高爆子弹_敌人 11
131+
// 自机 3
132+
// 敌机小型机 4
133+
// 敌机中型机_普通子弹版 5
134+
// 敌机中型机_高爆子弹版 12
135+
// 高爆子弹包 6
136+
// 双倍子弹包 7
137+
// 血量恢复包 8
138+
// 激光子弹包 10

0 commit comments

Comments
 (0)