123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- import { BuffConf } from "../conf/BuffConf";
- import { BattleDataPool } from "./BattleDataPool";
- import { BattleUtil } from "./BattleUtil";
- import { DataBase } from "./DataBase";
- export class BuffData extends DataBase{
-
- cover:number;
-
- srcDataBaseID:number;
- srcDataBase:DataBase;
-
-
- targetDataBaseID:number;
- targetDataBase:DataBase;
-
-
-
- duration:number;
-
- lifeTime:number;
-
- valueList:Array<number> = [];
- init(typeID:number,duration:number,valueList:Array<number>, src:DataBase,target:DataBase){
- super._init();
- this.typeID = typeID;
- this.srcDataBaseID = src.ID;
- this.srcDataBase = src;
- this.targetDataBaseID = target.ID;
- this.targetDataBase = target;
- let conf = BuffConf.data[typeID]
- if(conf){
- this.cover = conf.Cover;
- }
- else return null;
- this.duration = duration;
- this.valueList = valueList
- return this;
- }
- clear(){
- this.duration = 0;
- this.lifeTime = 0;
-
- this.srcDataBaseID = BattleUtil.TypeID_Init;
- this.srcDataBase = null;
-
-
- this.targetDataBaseID = BattleUtil.TypeID_Init;
- this.targetDataBase = null;
- this.valueList = []
- }
- }
- export let BuffDataPool = new BattleDataPool(BuffData,100)
|