public virtual bool Init(EntityParamEffect param, BattleEntity entity, uint target, EffectEntity parent) { this.param = param; this.entity = entity; this.parent = parent; this.mTarget = target; this.scale = entity.scale; IGameObject go = GetAgent(); if (go == null) { return(false); } OnInit(go); if (asset == null) { asset = new AssetEntity(); } asset.LoadAsset(param.asset, OnAssetLoad); OnBegin(); return(true); }
public override ITreeNode Clone(ITreeNode node) { EntityParamEffect param = node as EntityParamEffect; if (param != null) { param.effectType = this.effectType; param.arise = this.arise; param.on = this.on; param.asset = this.asset; param.delay = this.delay; param.offset = this.offset; } return(base.Clone(param)); }