예제 #1
0
        public static UnitBuffDisplayNode.Param[] CreateParams(UnitBuffDisplay parent, Unit owner, BuffAttachment buff)
        {
            List <UnitBuffDisplayNode.Param> objList = new List <UnitBuffDisplayNode.Param>();

            for (int index = 1; index < 5; ++index)
            {
                UnitBuffDisplayNode.BuffType buffType = (UnitBuffDisplayNode.BuffType)index;
                if ((double)UnitBuffDisplayNode.GetValue(buffType, buff) != 0.0)
                {
                    UnitBuffDisplay.NodeData nodeData = parent.GetNodeData(buffType);
                    if (nodeData != null)
                    {
                        objList.Add(new UnitBuffDisplayNode.Param(owner, buff, nodeData));
                    }
                }
            }
            if (objList.Count == 0)
            {
                objList.Add(new UnitBuffDisplayNode.Param(owner, buff, (UnitBuffDisplay.NodeData)null));
            }
            return(objList.ToArray());
        }
예제 #2
0
 public Param(Unit _owner, BuffAttachment _buff, UnitBuffDisplay.NodeData _data)
 {
     this.owner = _owner;
     this.buff  = _buff;
     this.data  = _data;
 }