Ejemplo n.º 1
0
    internal static void CardTriggered(CardDefinition definition)
    {
        int slot = UIManager.skillManager.PlaceTab(definition, GameManager.instance.percentThroughTurn);

        if (slot == -1)
        {
            return;
        }
        CardEffect effect = new CardEffect();

        effect.Load(definition);
        UIManager.CETurnManager.AddEffect(UISkillBar.SlotToGT(slot), effect);
    }
Ejemplo n.º 2
0
    public override void OnInspectorGUI()
    {
        UISkillBar script = (UISkillBar)target;

        DrawDefaultInspector();

        EditorGUILayout.Space();
        EditorGUI.BeginDisabledGroup(true);
        cost = EditorGUILayout.IntField("Cost", cost);
        if (GUILayout.Button("Find Space"))
        {
            int index = script.nextAvailableIndex(cost);
            for (int i = 0; i < cost; i++)
            {
                //script.tabList[index + i] = new UISkillBar.example();
            }
        }
        removeIndex = EditorGUILayout.IntField("remove at", removeIndex);
        if (GUILayout.Button("Remove"))
        {
            script.tabList[removeIndex] = null;
        }
        EditorGUI.EndDisabledGroup();
    }