public void AddBuff()
        {
            Unit unit = Game.Scene.GetComponent <UnitComponent>().Get(this.Unitid);

            BuffDataInfo.AutoAddBuff(BelongtoRuntimeTree.BelongNP_DataSupportor, this.BuffDataInfo.BuffNodeId.Value, unit, unit,
                                     BelongtoRuntimeTree);
        }
Beispiel #2
0
        public void AddBuffToSpecifiedUnit()
        {
            Unit unit = UnitComponent.Instance.Get(this.Unitid);

            foreach (var targetUnitId in NPBalckBoardRelationData.GetBlackBoardValue <List <long> >(this.BelongtoRuntimeTree.GetBlackboard()))
            {
                BuffDataInfo.AutoAddBuff(BelongtoRuntimeTree.BelongNP_DataSupportor, BuffDataInfo.BuffNodeId.Value, unit,
                                         UnitComponent.Instance.Get(targetUnitId), BelongtoRuntimeTree);
            }
        }