Ejemplo n.º 1
0
    public EntityTransform GetTransformPosition(EEntityTransform launchPos)
    {
        EntityTransform anyEntity = null;

        foreach (EntityTransform entityTransform in m_entityTranforms)
        {
            if (anyEntity == null)
            {
                anyEntity = entityTransform;
            }
            if (entityTransform.EntityTransformType == launchPos)
            {
                return(entityTransform);
            }
        }
        //If the character doesnt have any entityTransform we create one
        if (anyEntity == null)
        {
            GameObject objToSpawn = new GameObject("Center");
            anyEntity = objToSpawn.AddComponent <EntityTransform>();
            anyEntity.EntityTransformType = EEntityTransform.Center;
            objToSpawn.transform.SetParent(transform);
            objToSpawn.transform.localPosition = new Vector3(0, 0.4f, 0);
        }
        return(anyEntity);
    }
Ejemplo n.º 2
0
    public Particle ClientSpawnParticle(MobaEntity entity, string particlePrefab, EEntityTransform position)
    {
        EntityTransform entityTransform      = entity.GetTransformPosition(position);
        GameObject      sideEffectObj        = SpawnManager.instance.InstantiatePool(particlePrefab, entityTransform.transform.position, entityTransform.transform.rotation);
        int             projectileInstanceID = sideEffectObj.GetInstanceID();
        Particle        prefab = sideEffectObj.GetComponent <Particle>();

        prefab.Initialize(particlePrefab + "_" + projectileInstanceID, entity);
        m_particles.Add(prefab.ServerInstanceId, prefab);
        return(prefab);
    }
Ejemplo n.º 3
0
 public SideEffect(SideEffect effect)
 {
     m_effectIdentifier = effect.m_effectIdentifier;
     m_prefab           = effect.m_prefab;
     m_effectPos        = effect.m_effectPos;
     m_effectSound      = effect.m_effectSound;
     m_volume           = effect.m_volume;
     m_loopSound        = effect.m_loopSound;
     m_useType          = effect.m_useType;
     m_isPermanent      = effect.m_isPermanent;
     m_duration         = effect.m_duration;
     m_ticks            = effect.m_ticks;
 }
Ejemplo n.º 4
0
    public virtual int DrawEffect(int xPos, int yPos, GUISkin skin)
    {
        //int initPos = yPos;
#if UNITY_EDITOR
        EditorGUI.LabelField(new Rect(xPos + 150, yPos += 20, 150, 20), m_effectIdentifier, skin.label);
        EditorGUI.LabelField((new Rect(xPos, yPos, 180, 20)), new GUIContent("SideEffect Identifier: "), skin.label);

        m_prefab = EditorGUI.TextField(new Rect(xPos + 150, yPos += 20, 150, 20), m_prefab, skin.textField);
        EditorGUI.LabelField((new Rect(xPos, yPos, 180, 20)), new GUIContent("Effect Prefab Name: "), skin.label);

        m_effectSound = EditorGUI.TextField(new Rect(xPos + 150, yPos += 20, 150, 20), m_effectSound, skin.textField);
        EditorGUI.LabelField((new Rect(xPos, yPos, 180, 20)), new GUIContent("Side Effect Sound: "), skin.label);

        m_volume = EditorGUI.IntSlider(new Rect(xPos + 150, yPos += 20, 150, 20), m_volume, 0, 100);
        EditorGUI.LabelField((new Rect(xPos, yPos, 180, 20)), new GUIContent("Effect Sound Volume"), skin.label);

        m_loopSound = EditorGUI.Toggle(new Rect(xPos + 150, yPos += 20, 150, 20), m_loopSound);
        EditorGUI.LabelField((new Rect(xPos, yPos, 180, 20)), new GUIContent("Effect Sound Volume"), skin.label);

        m_effectPos = (EEntityTransform)EditorGUI.EnumPopup(new Rect(xPos + 150, yPos += 20, 150, 20), m_effectPos);
        EditorGUI.LabelField((new Rect(xPos, yPos, 180, 20)), new GUIContent("Launch Effect Pos: "), skin.label);

        m_useType = (EUseType)EditorGUI.EnumPopup(new Rect(xPos + 150, yPos += 20, 150, 20), m_useType);
        EditorGUI.LabelField((new Rect(xPos, yPos, 180, 20)), new GUIContent("Use Type: "), skin.label);

        switch (m_useType)
        {
        case EUseType.Timed:
            m_duration = EditorGUI.FloatField(new Rect(xPos + 150, yPos += 20, 200, 20), m_duration);
            EditorGUI.LabelField((new Rect(xPos, yPos, 180, 20)), new GUIContent("Effect Duration: "), skin.label);
            break;

        case EUseType.Ticks:
            m_ticks = EditorGUI.IntField(new Rect(xPos + 150, yPos += 20, 200, 20), m_ticks);
            EditorGUI.LabelField((new Rect(xPos, yPos, 180, 20)), new GUIContent("Effect Ticks: "), skin.label);
            break;

        case EUseType.Permanent:
            break;

        default:
            break;
        }

        EditorUtility.SetDirty(this);
#endif
        return(yPos);
    }
Ejemplo n.º 5
0
    public virtual MobaEntityData DrawEditor(GUISkin skin)
    {
        GUILayout.BeginVertical();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Data Identifier", skin.label);
        GUILayout.Label(m_dataIdentifier, skin.label, GUILayout.Width(200));
        m_dataIdentifier = GUILayout.TextField(m_dataIdentifier, skin.textField, GUILayout.Width(200));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Display Name", skin.label);
        m_dataDisplayName = GUILayout.TextField(m_dataDisplayName, skin.textField, GUILayout.Width(200));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Prefab Name", skin.label);
        m_prefab = GUILayout.TextField(m_prefab, skin.textField, GUILayout.Width(200));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Canvas", skin.label);
        m_canvasPrefab = GUILayout.TextField(m_canvasPrefab, skin.textField, GUILayout.Width(200));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Spawn Particle", skin.label);
        m_spawnParticle = GUILayout.TextField(m_spawnParticle, skin.textField, GUILayout.Width(200));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Spawn Particle Position", skin.label);
        EEntityTransform entityTransform = (EEntityTransform)EditorGUILayout.EnumPopup(m_spawnParticlePosition, GUILayout.Width(200));

        m_spawnParticlePosition = entityTransform;
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Death Prefab Particle", skin.label);
        m_deathPrefabParicle = GUILayout.TextField(m_deathPrefabParicle, skin.textField, GUILayout.Width(200));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Death Particle Position", skin.label);
        EEntityTransform deathParticlePosition = (EEntityTransform)EditorGUILayout.EnumPopup(m_deathParticlePosition, GUILayout.Width(200));

        m_deathParticlePosition = deathParticlePosition;
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Respawn Type", skin.label);
        EEntityRespawnType respawnType = (EEntityRespawnType)EditorGUILayout.EnumPopup(m_respawnType, GUILayout.Width(200));

        m_respawnType = respawnType;
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Respawn Time", skin.label);
        m_respawnTime = EditorGUILayout.FloatField(m_respawnTime, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Icon", skin.label);
        m_icon = GUILayout.TextField(m_icon, skin.textField, GUILayout.Width(200));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Uses Path Finfing", skin.label);
        m_usesPathFinfing = EditorGUILayout.Toggle(m_usesPathFinfing, skin.toggle, GUILayout.Width(200));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Team", skin.label);
        ETeam team = (ETeam)EditorGUILayout.EnumPopup(m_team, GUILayout.Width(200));

        m_team = team;
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Gold Bonus", skin.label);
        m_goldBonus = EditorGUILayout.IntField(m_goldBonus, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Base Attack Damage", skin.label);
        m_baseAttackDamage = EditorGUILayout.FloatField(m_baseAttackDamage, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Ad Increase Per Level", skin.label);
        m_adPerLevel = EditorGUILayout.FloatField(m_adPerLevel, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Base Magic Damage", skin.label);
        m_baseMagicDamage = EditorGUILayout.FloatField(m_baseMagicDamage, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Base Armor", skin.label);
        m_armor = EditorGUILayout.FloatField(m_armor, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Armor Increase Per Level", skin.label);
        m_armorPerLevel = EditorGUILayout.FloatField(m_armorPerLevel, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Base Magic Resistance", skin.label);
        m_magicRes = EditorGUILayout.FloatField(m_magicRes, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Health", skin.label);
        m_healthMax = EditorGUILayout.FloatField(m_healthMax, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Health Increase Per Level", skin.label);
        m_healthPerLevel = EditorGUILayout.FloatField(m_healthPerLevel, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Health Base Regeneration", skin.label);
        m_healthRegenerate = EditorGUILayout.FloatField(m_healthRegenerate, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Mana", skin.label);
        m_manaMax = EditorGUILayout.FloatField(m_manaMax, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Mana Base Regeneration", skin.label);
        m_manaRegeneration = EditorGUILayout.FloatField(m_manaRegeneration, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        GUILayout.Label("Movement Base Speed", skin.label);
        m_speed = EditorGUILayout.FloatField(m_speed, skin.textField, GUILayout.Width(200), GUILayout.Height(20));
        GUILayout.EndHorizontal();

        for (int i = 0; i < m_characterAbilities.Count; i++)
        {
            GUILayout.BeginHorizontal();
            GUILayout.Label((i + 1) + " - Ability Identifier: ", skin.label);
            m_characterAbilities[i] = GUILayout.TextField(m_characterAbilities[i], skin.textField, GUILayout.Width(200));
            if (GUILayout.Button(new GUIContent(""), skin.customStyles[2], GUILayout.Width(20), GUILayout.Height(20)))
            {
                m_characterAbilities.RemoveAt(i);
                return(this);
            }
            GUILayout.EndHorizontal();
        }

        GUILayout.BeginHorizontal();
        GUILayout.Label("Add Ability", skin.label);
        if (GUILayout.Button(new GUIContent(""), skin.customStyles[1], GUILayout.Width(30), GUILayout.Height(30)))
        {
            m_characterAbilities.Add("");
        }
        GUILayout.EndHorizontal();

        GUILayout.EndVertical();

        return(this);
    }
Ejemplo n.º 6
0
    public int DrawAbility(int posX, int yPos, int maxLevel, GUISkin skin)
    {
        int initPos = yPos;

#if UNITY_EDITOR
        //EditorStyles.textField.fontStyle = FontStyle.Bold;

        m_icon = (Sprite)EditorGUI.ObjectField(new Rect(posX, yPos, 70, 70), m_icon, typeof(Sprite), false);

        yPos += 70;

        m_identifier = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 150, 20), m_identifier, skin.textField);
        EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Ability Identifier", "Ability identifier used to identity and load abilities"), skin.label);

        m_abilityName = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 150, 20), m_abilityName, skin.textField);
        EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Ability Description Name: ", "Ability name to show"), skin.label);

        m_attackType = (EAttackType)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_attackType);
        EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Ability Type: ", "Ability type"), skin.label);

        m_requiresTarget = EditorGUI.Toggle(new Rect(posX + 150, yPos += 20, 150, 20), m_requiresTarget);
        EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Requires Target?: ", "Select this if the current ability requires targetting. The target could be a Position or Entity"), skin.label);

        m_faceTarget = EditorGUI.Toggle(new Rect(posX + 150, yPos += 20, 150, 20), m_faceTarget);
        EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Look Target?: ", "Select this if you want the entity to face the target while casting the ability"), skin.label);

        if (m_requiresTarget)
        {
            posX += 40;

            m_targetType = (ETargetType)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_targetType);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Target Type: ", "Select the type of the target that you want the ability to make effect."), skin.label);
            if (m_targetType != ETargetType.SelfTarget)
            {
                m_allegiance = (EAllegiance)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_allegiance);
                EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Target Allegiance: ", "Select the allegiance to be used by the ability to filter targets or detect collisions."), skin.label);
            }
            if (m_targetType != ETargetType.SelfTarget && m_targetType != ETargetType.AllTarget)
            {
                m_maxTargets = EditorGUI.IntSlider(new Rect(posX + 150, yPos += 20, 150, 20), m_maxTargets, 1, 10);
                EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Max Targets: ", "Max targets the ability will try go cast the ability on."), skin.label);
            }
            posX -= 40;
            if (m_targetType == ETargetType.PositionTarget)
            {
                m_skillShotType = (ESkillShotType)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_skillShotType);
                EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("SkillShot Type: ", "If the target type is a Position Target. \nFrontSkill: The ability will be casted from the entity to the target direction. \nFloorSkill: The ability will be casted from the floor position."), skin.label);
                if (m_skillShotType == ESkillShotType.FrontSkill)
                {
                    m_detectionRange = EditorGUI.FloatField(new Rect(posX + 150, yPos += 20, 150, 20), m_detectionRange, skin.textField);
                    EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Collision Detection Range: ", "This is the distance the ability will be using to detect collisions. \nRecommended Setting: 0.3f"), skin.label);
                }
            }
            m_indicatorPrefab = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 150, 20), m_indicatorPrefab, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Indicator Prefab: ", "This is the Indicator used to handle the gizmo logic to show the ability range, position or direction. \nDefault Values: \n-SimpleIndicator"), skin.label);
            if (m_targetType == ETargetType.PositionTarget)
            {
                m_targetImageIndicator = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 150, 20), m_targetImageIndicator, skin.textField);
                EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Target Indicator Image: ", "This is the Target Image loaded by the Indicator. \nDefault Values: \n-SimpleFloorImage  \n-SimpleFrontImage"), skin.label);
            }
            m_rangeImageIndicator = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 150, 20), m_rangeImageIndicator, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Range Indicator Image: ", "This is the Range Image loaded by the Indicator to show the ability Range to the player. \nDefault Values: \n-SimpleRangueImage"), skin.label);
        }
        else
        {
        }

        GUI.color = new Color(0f, .8f, .8f, 0.15f);
        //GUI.Box(new Rect(posX, initPos, 350, (yPos - initPos) + 20), "");
        GUI.color = Color.white;

        yPos += 30;


        //Casting Parameters
        m_playCastAnimation = EditorGUI.Toggle(new Rect(posX + 150, yPos += 20, 150, 20), m_playCastAnimation);
        EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Play Cast Animation? "), skin.label);

        if (m_playCastAnimation)
        {
            posX += 40;
            m_castingAnimation = (EEntityState)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_castingAnimation);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Cast Animation: "), skin.label);

            m_castTime = EditorGUI.FloatField(new Rect(posX + 150, yPos += 20, 180, 20), m_castTime, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Casting Time"), skin.label);

            m_castParticleIdentifier = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 150, 20), m_castParticleIdentifier, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Cast Particle Identifier"), skin.label);
            posX -= 40;
        }

        //Animation Parameters
        m_playAbilityAnimation = EditorGUI.Toggle(new Rect(posX + 150, yPos += 20, 150, 20), m_playAbilityAnimation);
        EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Plays Ability Anim? ", "Mark this if the ability runs animations."), skin.label);

        if (m_playAbilityAnimation)
        {
            posX       += 40;
            m_animation = (EEntityState)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_animation);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Ability Animation: "), skin.label);
            posX -= 40;
        }

        if (m_playCastAnimation || m_playAbilityAnimation)
        {
            m_launchingType = (ELaunchingState)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_launchingType);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Launch State: "), skin.label);

            m_animationPercentLaunch = EditorGUI.IntSlider(new Rect(posX + 150, yPos += 20, 150, 20), m_animationPercentLaunch, 0, 100);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Anim Percent Launch"), skin.label);
        }



        m_processor = (AbilityProcessorType)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_processor);
        EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Ability processor type"), skin.label);


        switch (m_processor)
        {
        case AbilityProcessorType.DamageImpact:

            break;

        case AbilityProcessorType.LaunchAbility:
            posX += 40;
            m_projectileIdentifier = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 180, 20), m_projectileIdentifier, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Projectile Prefab Identifier"), skin.label);
            m_projectileQuantity = EditorGUI.IntField(new Rect(posX + 150, yPos += 20, 180, 20), m_projectileQuantity, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Projectile Quantity"), skin.label);
            m_projectileSpeed = EditorGUI.FloatField(new Rect(posX + 150, yPos += 20, 180, 20), m_projectileSpeed, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Projectile Speed"), skin.label);

            posX -= 40;
            break;

        case AbilityProcessorType.CastSideEffectsOnly:
            m_damageLogic = EDamageLogic.None;
            break;

        default:
            break;
        }
        if (m_processor != AbilityProcessorType.CastSideEffectsOnly)
        {
            m_launchPos = (EEntityTransform)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_launchPos);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Ability launch Position"), skin.label);
            m_launchParticleIdentifier = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 150, 20), m_launchParticleIdentifier, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Launch Particle Prefab Identifier"), skin.label);
            m_launchParticlePercentLaunch = EditorGUI.IntSlider(new Rect(posX + 150, yPos += 20, 150, 20), m_launchParticlePercentLaunch, 0, 100);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Launch Particle Animation Percent"), skin.label);
            m_impactParticleIdentifier = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 150, 20), m_impactParticleIdentifier, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Impact Particle Prefab Identifier"), skin.label);
            m_launchSoundIdentifier = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 150, 20), m_launchSoundIdentifier, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Launch Sound Identifier"), skin.label);
            m_launchSoundVolume = EditorGUI.IntSlider(new Rect(posX + 150, yPos += 20, 150, 20), m_launchSoundVolume, 0, 100);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Launch Sound Volume"), skin.label);
            m_impactSoundIdentifier = EditorGUI.TextField(new Rect(posX + 150, yPos += 20, 150, 20), m_impactSoundIdentifier, skin.textField);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Impact Sound Identifier"), skin.label);
            m_impactSoundVolume = EditorGUI.IntSlider(new Rect(posX + 150, yPos += 20, 150, 20), m_impactSoundVolume, 0, 100);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Impact Sound Volume"), skin.label);
            posX         += 400;
            yPos          = 150;
            m_damageLogic = (EDamageLogic)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_damageLogic);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Damage Logic"), skin.label);
        }



        if (m_damageLogic != EDamageLogic.None)
        {
            m_canDamageTowers = EditorGUI.Toggle(new Rect(posX + 150, yPos += 20, 150, 20), m_canDamageTowers);
            EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Can Damage towers?: "), skin.label);

            if (m_damageLogic == EDamageLogic.DamageAoeLogic)
            {
                m_aoeRange = EditorGUI.FloatField(new Rect(posX + 150, yPos += 20, 180, 20), m_aoeRange);
                EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Damage Aoe Range"), skin.label);
            }
        }
        else
        {
            //Damage logic == none
        }

        int prevPosX = posX;
        m_canLevelUp = EditorGUI.Toggle(new Rect(posX + 150, yPos += 20, 150, 20), m_canLevelUp);
        EditorGUI.LabelField(new Rect(posX, yPos, 150, 20), new GUIContent("Can level up?: "), skin.label);
        if (m_canLevelUp)
        {
            while (m_abilityDamageData.Count < maxLevel)
            {
                m_abilityDamageData.Add(new AbilityDamageData());
            }
        }
        else
        {
            if (m_abilityDamageData.Count == 0)
            {
                m_abilityDamageData.Add(new AbilityDamageData());
            }
            if (m_abilityDamageData.Count > 1)
            {
                m_abilityDamageData.RemoveRange(1, m_abilityDamageData.Count - 1);
            }
        }
        yPos += 20;
        for (int i = 0; i < m_abilityDamageData.Count; i++)
        {
            if (i == 0)
            {
                EditorGUI.LabelField((new Rect(posX, yPos + 20, 180, 20)), new GUIContent("Base Damage"), skin.label);
                EditorGUI.LabelField((new Rect(posX, yPos + 40, 180, 20)), new GUIContent("Base Ability"), skin.label);
                EditorGUI.LabelField((new Rect(posX, yPos + 60, 180, 20)), new GUIContent("Range"), skin.label);
                EditorGUI.LabelField((new Rect(posX, yPos + 80, 180, 20)), new GUIContent("ColdDown"), skin.label);
                EditorGUI.LabelField((new Rect(posX, yPos + 100, 180, 20)), new GUIContent("ManaCost"), skin.label);
                posX += 100;
            }
            EditorGUI.LabelField((new Rect(posX + (50 * i), yPos, 180, 20)), new GUIContent("Lvl: " + (i + 1)), skin.label);
            m_abilityDamageData[i].BaseAdDamage = EditorGUI.FloatField(new Rect(posX + (50 * i), yPos += 20, 35, 20), m_abilityDamageData[i].BaseAdDamage);
            m_abilityDamageData[i].BaseApDamage = EditorGUI.FloatField(new Rect(posX + (50 * i), yPos += 20, 35, 20), m_abilityDamageData[i].BaseApDamage);
            m_abilityDamageData[i].Range        = EditorGUI.FloatField(new Rect(posX + (50 * i), yPos += 20, 35, 20), m_abilityDamageData[i].Range);
            if (m_abilityDamageData[i].Range < 1)
            {
                m_abilityDamageData[i].Range = 1;
            }
            m_abilityDamageData[i].ColdDownSeconds = EditorGUI.FloatField(new Rect(posX + (50 * i), yPos += 20, 35, 20), m_abilityDamageData[i].ColdDownSeconds);
            m_abilityDamageData[i].ManaCost        = EditorGUI.FloatField(new Rect(posX + (50 * i), yPos += 20, 35, 20), m_abilityDamageData[i].ManaCost);

            yPos -= 5 * 20;
        }
        posX -= 400;
        yPos += 5 * 20;
        posX  = prevPosX;
        yPos += 30;

        m_abilityDescription = EditorGUI.TextArea(new Rect(posX, yPos += 20, 300, 20 + 60), m_abilityDescription);
        yPos += 60;
        if (GUI.Button(new Rect(posX, yPos += 20, 300, 20), "Add Description Param"))
        {
            m_descriptionParamList.Add(new EDescriptionParameter());
            return(0);
        }
        for (int i = 0; i < m_descriptionParamList.Count; i++)
        {
            m_descriptionParamList[i] = (EDescriptionParameter)EditorGUI.EnumPopup(new Rect(posX + 150, yPos += 20, 150, 20), m_descriptionParamList[i]);
            EditorGUI.LabelField((new Rect(posX, yPos, 180, 20)), new GUIContent("Param Number: " + i), skin.label);
        }



        //Effects Parameters

        yPos = initPos;

        GUIStyle m_boldStyle = new GUIStyle();
        m_boldStyle.fontSize  = 18;
        m_boldStyle.fontStyle = FontStyle.Bold;
        EditorGUI.LabelField(new Rect(posX + 400, yPos - 40, 300, 20), new GUIContent("Side Effects Configuration"), skin.GetStyle("BoldText"));

        m_effectClasses = GetEffectClasses();

        m_effectClassIndex = EditorGUI.Popup(new Rect(posX + 400, yPos += 20, 300, 20), m_effectClassIndex, m_effectClasses);
        GUI.color          = Color.green;
        if (GUI.Button(new Rect(posX + 400, yPos += 20, 300, 20), "Add Side Effect"))
        {
            SideEffect effect = ScriptableObjectUtility.CreateAsset(m_effectClasses[m_effectClassIndex], Identifier);
            effect.EffectIdentifier = Identifier + "-" + m_effectClasses[m_effectClassIndex];
            m_sideEffects.Add(effect);
            AssetDatabase.SaveAssets();
            AssetDatabase.Refresh();
            return(0);
        }
        GUI.color = Color.white;
        yPos     += 30;
        for (int i = 0; i < m_sideEffects.Count; i++)
        {
            //GUI.contentColor = Color.cyan;

            EditorGUI.LabelField((new Rect(posX + 400, yPos += 20, 300, 20)), new GUIContent("Effect Type: " + m_sideEffects[i].GetType().ToString()), skin.label);


            int boxPosY = yPos;
            yPos = m_sideEffects[i].DrawEffect(posX + 400, yPos, skin);
            //GUI.color = Color.cyan;
            GUI.Box(new Rect(posX + 390, boxPosY, 8, (yPos - boxPosY) + 20), "");
            //GUI.color = Color.red;
            EditorGUI.LabelField((new Rect(posX + 400, yPos += 20, 300, 20)), new GUIContent("Remove this effect "), skin.GetStyle("RedText"));
            if (GUI.Button(new Rect(posX + 550, yPos, 20, 20), "", skin.GetStyle("RemoveButton")))
            {
                string path = AssetDatabase.GetAssetPath(m_sideEffects[i]);
                AssetDatabase.DeleteAsset(path);
                m_sideEffects.RemoveAt(i);
                break;
            }
            //    if (GUI.Button(new Rect(posX + 400, yPos += 20, 300, 20), "Remove This Effect"))
            //{
            //
            //}
            //GUI.color = Color.white;
            yPos += 20;
        }


        EditorUtility.SetDirty(this);
#endif
        return(yPos - initPos);
    }