This commit is contained in:
2024-08-08 10:44:58 +08:00
parent d06189486d
commit 3eca33a33f
11 changed files with 677 additions and 453 deletions

View File

@@ -4,7 +4,7 @@
* @LastEditors: dgflash
* @LastEditTime: 2022-08-17 13:43:02
*/
import { profiler, _decorator ,PhysicsSystem2D} from 'cc';
import { profiler, _decorator ,PhysicsSystem2D,RigidBody} from 'cc';
import { DEBUG } from 'cc/env';
import { oops } from '../../extensions/oops-plugin-framework/assets/core/Oops';
import { Root } from '../../extensions/oops-plugin-framework/assets/core/Root';
@@ -19,21 +19,24 @@ const { ccclass, property } = _decorator;
export class Main extends Root {
start() {
if (DEBUG) profiler.showStats();
}
protected async run() {
smc.initialize = ecs.getEntity<Initialize>(Initialize);
smc.monsters = [
{prefab_path:'lang',name:'迅狼',speed:110},
{prefab_path:'hero',name:'火猴',speed:100},
// {prefab_path:'niu',name:'m3',speed:40},
// {prefab_path:'niu',name:'m4',speed:80},
{prefab_path:'lang',name:'迅狼',speed:40},
{prefab_path:'hero',name:'火猴',speed:40},
{prefab_path:'lang',name:'m3',speed:40},
{prefab_path:'lang',name:'m4',speed:40},
{prefab_path:'lang',name:'m3',speed:40},
{prefab_path:'lang',name:'m4',speed:40},
]
smc.heros = [
// {prefab_path:'lang',name:'迅狼',speed:110},
{prefab_path:'liubang',name:'刘邦',speed:80},
{prefab_path:'mulan',name:'花木兰',speed:70},
{prefab_path:'yinzheng',name:'嬴政',speed:60},
{prefab_path:'liubang',name:'刘邦',speed:40},
{prefab_path:'mulan',name:'花木兰',speed:40},
{prefab_path:'yinzheng',name:'嬴政',speed:40},
]
console.log("Game start");
smc.vmAdd()