dd
This commit is contained in:
@@ -25,15 +25,15 @@ export class Main extends Root {
|
||||
smc.initialize = ecs.getEntity<Initialize>(Initialize);
|
||||
smc.monsters = [
|
||||
{prefab_path:'lang',name:'迅狼',speed:110},
|
||||
{prefab_path:'hero',name:'火猴',speed:110},
|
||||
{prefab_path:'hero',name:'火猴',speed:100},
|
||||
// {prefab_path:'niu',name:'m3',speed:40},
|
||||
// {prefab_path:'niu',name:'m4',speed:80},
|
||||
]
|
||||
smc.heros = [
|
||||
// {prefab_path:'lang',name:'迅狼',speed:110},
|
||||
{prefab_path:'liubang',name:'刘邦',speed:110},
|
||||
{prefab_path:'mulan',name:'花木兰',speed:110},
|
||||
{prefab_path:'yinzheng',name:'嬴政',speed:110},
|
||||
{prefab_path:'liubang',name:'刘邦',speed:80},
|
||||
{prefab_path:'mulan',name:'花木兰',speed:70},
|
||||
{prefab_path:'yinzheng',name:'嬴政',speed:60},
|
||||
]
|
||||
console.log("Game start");
|
||||
smc.vmAdd()
|
||||
|
||||
@@ -38,9 +38,18 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
/** 下级经验 */
|
||||
speed : 0,
|
||||
hp: {
|
||||
min:50,
|
||||
max:100
|
||||
}
|
||||
min:30,
|
||||
max:30
|
||||
},
|
||||
power: {
|
||||
min: 0,
|
||||
max: 30
|
||||
},
|
||||
gold: {
|
||||
min: 0,
|
||||
max: 10
|
||||
},
|
||||
|
||||
};
|
||||
vmAdd() {
|
||||
console.log("dataModelComp vmAdd");
|
||||
|
||||
@@ -52,13 +52,12 @@ export class MonsterViewComp extends CCComp {
|
||||
}
|
||||
}
|
||||
onBeginContact (selfCollider: Collider2D, otherCollider: Collider2D, contact: IPhysics2DContact | null) {
|
||||
|
||||
switch (selfCollider.tag) {
|
||||
case BoxSet.MONSTER:
|
||||
switch (otherCollider.tag){
|
||||
case BoxSet.HERO:
|
||||
this.state = 2;
|
||||
// console.log("im monster other is hero");
|
||||
console.log('onBeginContact',selfCollider,otherCollider);
|
||||
// this.speed = 0;
|
||||
// this.timer = 1;
|
||||
// console.log("speed:"+this.speed+" | timer:"+this.timer);
|
||||
@@ -77,7 +76,7 @@ export class MonsterViewComp extends CCComp {
|
||||
break;
|
||||
case BoxSet.HERO_SKILL:
|
||||
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user