mirror of
https://github.com/szrpf/DataBoardDemo.git
synced 2024-12-26 03:38:33 +00:00
27 lines
503 B
TypeScript
27 lines
503 B
TypeScript
const {ccclass, property} = cc._decorator;
|
|
|
|
@ccclass
|
|
export default class Helloworld extends cc.Component {
|
|
hp = 100;
|
|
mp = 60;
|
|
equip = {
|
|
name:'装备',
|
|
sword:{
|
|
name:'小刀',
|
|
attack:30
|
|
},
|
|
shoe:{
|
|
name:'草鞋',
|
|
attr:{
|
|
name:'属性',
|
|
speed:5,
|
|
durable:100
|
|
}
|
|
}
|
|
}
|
|
|
|
update (dt) {
|
|
this.hp += 1.0*dt;
|
|
this.mp += 0.5*dt;
|
|
}
|
|
} |