示例#1
0
 public static DotController.DotIndex RegisterDot(float interval, float damageCoef, DamageColorIndex colorIndex, BuffDef associatedBuff, CustomDotAddAction addAction, CustomDotUpdateAction updateAction)
 {
     return(RegisterDot(new DotController.DotDef
     {
         interval = interval,
         damageCoefficient = damageCoef,
         damageColorIndex = colorIndex,
         associatedBuff = associatedBuff
     }, addAction, updateAction));
 }
示例#2
0
        public static DotController.DotIndex RegisterDot(DotController.DotDef def, CustomDotAddAction addAction, CustomDotUpdateAction updateAction)
        {
            if (CustomDotDefs.ContainsKey(def))
            {
                LogCore.LogE(def + " has already been registered, please do not register the same DotDef twice.");
                return(DotController.DotIndex.None);
            }

            CustomDotDefs.Add(def, new DotActionContainer()
            {
                Add = addAction, Update = updateAction
            });

            return((DotController.DotIndex)((int)DotController.DotIndex.Count + CustomDotDefs.Count));
        }