123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- /** @format */
- import {ComType, EntityIndex} from '../lib/Const'
- import {ECSComponent} from '../lib/ECSComponent'
- import {cObject} from '../../collision/Object'
- import {IRoleConfig} from '../../config/RoleConfig'
- import {ISkillConfig} from '../../config/SkillConfig'
- import {EntryObj, FightInfo, IBuff} from '../core/GameInterface'
- import {ENTRY} from '../../enums/Enum'
- import {idNum} from '../../proto/typedef'
- import {IEquip} from '../../interface/GlobalInterface'
- @ECSComponent(ComType.ComRole)
- export class ComRole {
- public roleCfg: IRoleConfig
- public width: number
- public height: number
- public spineEntity: number
- public group: number
- public lastHP: number
- public nowHP: number
- public lastShieldHP: number
- public shieldHP: number
- public HPDirty: boolean
- public transDirty: boolean //变身标记
- public transID: number //变身前的ID
- public attackRange: number // 攻击范围 近战固定值100 远程配置攻击范围-1000
- public invincible: boolean // 是否无敌
- //----基础属性---
- public HP: number // 血量 >=0
- public attack: number // 攻击力 >=0
- public spellAttack: number // 法术攻击力 >=0
- public realAttack: number // 真实攻击力 >=0
- public defense: number // 防御力 >=0
- public spellDefense: number // 法术防御力 >=0
- public attackCrit: number // 攻击力暴击率 >=0
- public critNum: number // 暴击率倍数 >=0
- public hit: number // 攻击力命中 >=0
- public dodge: number // 闪避 >=0
- public attackSpeed: number // 攻击速度 5000-50000
- public moveSpeed: number // 移动速度
- //----攻击速度影响下面两个值---
- public attackCD: number // 攻击间隔时间
- public attackTime: number // 攻击时间
- public castTime: number[] // 技能时间
- public enterTime: number // 入场时间
- public dieTime: number // 死亡时间
- public attackNum: number //攻击次数
- public killNum: number //杀人次数
- //词条
- public entryMap: Map<ENTRY, EntryObj> = new Map<ENTRY, EntryObj>()
- //身体
- public cObject: cObject
- //技能配置
- public skills: ISkillConfig[] = []
- //所有的技能CD
- public skillCDs: number[] = []
- //技能入场CD
- public enterCDs: number[] = []
- //当前冷却
- public skillCountDowns: number[] = []
- //自己当前持有的buff
- public buffs: IBuff[] = []
- public buffDirty: boolean = false
- //自己的召唤物
- public babys: EntityIndex[] = []
- //召唤物的主人
- public parent: EntityIndex
- public parentRoleID: number
- //战斗信息
- public fightInfo: FightInfo[] = []
- //掉落
- public drop: idNum
- // 是否是额外投放敌人
- public isExtraEnemy: boolean
- //装备
- public equips: IEquip[]
- }
|