123456789101112131415161718192021222324252627282930313233 |
- import { _decorator, Component, Node } from 'cc';
- import { KillAllMonsterSkill } from './KillAllMonsterSkill';
- import { SkillBase } from './SkillBase';
- const { ccclass, property } = _decorator;
- export default class SkillManager{
- constructor(){
- }
-
- /**
- * 创建技能
- * @param type
- */
- public Create(type:number):SkillBase{
- // switch (type) {
- // case 1:
- // return new KillAllMonsterSkill();
- // default:
- // break;
- // }
- return new KillAllMonsterSkill();
- }
- private static instance:SkillManager;
- public static get single():SkillManager{
- if(this.instance==null){
- this.instance=new SkillManager();
- }
- return this.instance;
- }
- }
|