示例#1
0
 private void OnCooldownSet(ChangeEvent <float> evt = null)
 {
     if (cooldownMsg != null)
     {
         cooldownMsg.TryRemoveFromParent();
     }
     if (TargetType.cooldown < 0)
     {
         cooldownMsg = CreateHelpBox("You've set cooldown to a negative value! this is not allowed!", MessageType.Error);
         messages.Add(cooldownMsg);
     }
 }
示例#2
0
        private void OnXPlayerToggle(ChangeEvent <bool> evt = null)
        {
            if (notAppearMessage != null)
            {
                notAppearMessage.TryRemoveFromParent();
            }

            if (DoesNotAppear)
            {
                notAppearMessage = CreateHelpBox("You've set both \"Appears in SinglePlayer\" and \"Appears in MultiPlayer\" false! The equipment will not appear!", MessageType.Warning);
                messages.Add(notAppearMessage);
            }
        }
示例#3
0
        private void CheckSoundEvent(ChangeEvent <UnityEngine.Object> evt = null)
        {
            if (networkSoundEventdefMessage != null)
            {
                networkSoundEventdefMessage.TryRemoveFromParent();
            }

            if (!networkSoundEventDef)
            {
                return;
            }

            if (networkSoundEventDef.eventName.IsNullOrEmptyOrWhitespace())
            {
                networkSoundEventdefMessage = CreateHelpBox($"You've associated a NetworkSoundEventDef ({networkSoundEventDef.name}) to this buff, but the EventDef's eventName is Null, Empty or Whitespace!", MessageType.Warning);
                messages.Add(networkSoundEventdefMessage);
            }
        }
示例#4
0
        private void OnBuffDefSet(ChangeEvent <BuffDef> evt = null)
        {
            var button = Find <Button>(slider, "chanceSetter");

            buffMessage?.TryRemoveFromParent();

            if (!passiveBuffDef)
            {
                return;
            }

            if (passiveBuffDef.eliteDef && passiveBuffDef.eliteDef.eliteEquipmentDef != TargetType)
            {
                buffMessage = CreateHelpBox($"You've assigned a BuffDef ({TargetType.passiveBuffDef.name}) to this EquipmentDef, And the BuffDef has an EliteDef ({TargetType.passiveBuffDef.eliteDef.name}), But said EliteDef's Elite Equipment Def is not the inspected EquipmentDef!", MessageType.Warning);
                messages.Add(buffMessage);
                Find <Button>(slider, "chanceSetter").style.display = DisplayStyle.None;
            }
            else
            {
                Find <Button>(slider, "chanceSetter").style.display = DisplayStyle.Flex;
            }
        }