예제 #1
0
    public Interaction Interact()
    {
        //.Log(interactions);

        if (interactions == 0)
        {
            interactions++;
            bms.purchaseActions = new List <UnityEngine.Events.UnityAction>();
            bms.purchaseActions.Add(slot1);
            bms.purchaseActions.Add(slot2);
            bms.purchaseActions.Add(slot3);
            //Debug.Log("shady" + bms.purchaseActions.Count);
            bms.labels = new List <string>();
            bms.labels.Add("replace slot 1");
            bms.labels.Add("replace slot 2");
            bms.labels.Add("replace slot 3");
            bms.costs = new List <string>();
            bms.costs.Add(SpellTracker.main.spells[PlayerClass.main.spells[0]].spellName);
            bms.costs.Add(SpellTracker.main.spells[PlayerClass.main.spells[1]].spellName);
            bms.costs.Add(SpellTracker.main.spells[PlayerClass.main.spells[2]].spellName);
            bms.gameObject.SetActive(true);
        }
        else if (interactions == 1)
        {
            interactions        = 0;
            bms.labels          = new List <string>();
            bms.purchaseActions = new List <UnityEngine.Events.UnityAction>();
            bms.costs           = new List <string>();
            bms.gameObject.SetActive(false);
            bms.destroyAllOptions();
        }
        return(null);
    }
예제 #2
0
 public Interaction Interact()
 {
     if (interactions == 0)
     {
         PlayerClass.main.theCanvas.GetComponentsInChildren <GoldUI>()[0].updateGoldLobby();
         if (pc.gold >= 10)
         {
             interactions++;
         }
         interactions++;
         return(new Interaction(gamblerSprite, "Up for some gambling?", Resources.GetBuiltinResource <Font>("Arial.ttf")));
     }
     else if (interactions == 1 && pc.gold < 10)
     {
         interactions++;
         return(new Interaction(gamblerSprite, "Are you sure? Bad things happen when you're in debt.", Resources.GetBuiltinResource <Font>("Arial.ttf")));
     }
     else if (interactions == 2)
     {
         SpellTracker.main.Start2();
         interactions++;
         bms.purchaseActions = new List <UnityEngine.Events.UnityAction>();
         bms.purchaseActions.Add(dropToken);
         bms.purchaseActions.Add(dropToken1);
         bms.purchaseActions.Add(dropToken2);
         //Debug.Log("shady" + bms.purchaseActions.Count);
         bms.labels = new List <string>();
         bms.labels.Add("Easy Gambling Token");
         bms.labels.Add("Medium Gambling Token");
         bms.labels.Add("Hard Gambling Token");
         bms.costs = new List <string>();
         bms.costs.Add("10 Gold");
         bms.costs.Add("10 Gold");
         bms.costs.Add("10 Gold");
         bms.gameObject.SetActive(true);
     }
     else if (interactions == 3)
     {
         interactions        = 0;
         bms.labels          = new List <string>();
         bms.purchaseActions = new List <UnityEngine.Events.UnityAction>();
         bms.costs           = new List <string>();
         bms.gameObject.SetActive(false);
         bms.destroyAllOptions();
     }
     return(null);
 }
예제 #3
0
 public void OnTriggerExit2D(Collider2D collision)
 {
     if (collision.gameObject.TryGetComponent <PlayerClass>(out PlayerClass pc))
     {
         inRange = false;
         pc.ms.interaction.gameObject.SetActive(false);
         bms.gameObject.SetActive(false);
         bms.destroyAllOptions();
         interactions = 0;
     }
 }
예제 #4
0
 public Interaction Interact()
 {
     if (interactions == 0)
     {
         PlayerClass.main.theCanvas.GetComponentsInChildren <GoldUI>()[0].updateGoldLobby();
         interactions++;
         return(new Interaction(martieSprite, "Greetings. I can exchange your gold for some magical abilities.", Resources.GetBuiltinResource <Font>("Arial.ttf")));
     }
     else if (interactions == 1)
     {
         SpellTracker.main.Start2();
         interactions++;
         bms.purchaseActions = new List <UnityEngine.Events.UnityAction>();
         bms.purchaseActions.Add(spell1);
         bms.purchaseActions.Add(spell2);
         bms.purchaseActions.Add(spell3);
         //Debug.Log("shady" + bms.purchaseActions.Count);
         bms.labels = new List <string>();
         bms.labels.Add(SpellTracker.main.spells[s1].spellName);
         bms.labels.Add(SpellTracker.main.spells[s2].spellName);
         bms.labels.Add(SpellTracker.main.spells[s3].spellName);
         bms.costs = new List <string>();
         bms.costs.Add(p1 + " Gold");
         bms.costs.Add(p2 + " Gold");
         bms.costs.Add(p3 + " Gold");
         bms.gameObject.SetActive(true);
     }
     else if (interactions == 2)
     {
         interactions        = 0;
         bms.labels          = new List <string>();
         bms.purchaseActions = new List <UnityEngine.Events.UnityAction>();
         bms.costs           = new List <string>();
         bms.gameObject.SetActive(false);
         bms.destroyAllOptions();
     }
     return(null);
 }
예제 #5
0
    public Interaction Interact()
    {
        //.Log(interactions);
        if (interactions == 0)
        {
            interactions++;
            return(new Interaction(shadySprite, "Greetings. I can exchange your shade for a bonus in combat.", Resources.GetBuiltinResource <Font>("Arial.ttf")));
        }
        else if (interactions == 1)
        {
            interactions++;

            /*bms.purchaseActions = new List<UnityEngine.Events.UnityAction>();
             * bms.purchaseActions.Add(UpMelee);
             * bms.purchaseActions.Add(UpHealth);
             * bms.purchaseActions.Add(UpMana);
             * //Debug.Log("shady" + bms.purchaseActions.Count);
             * bms.labels = new List<string>();
             * bms.labels.Add("melee attack up");
             * bms.labels.Add("health up");
             * bms.labels.Add("mana up");
             * bms.costs = new List<string>();
             * bms.costs.Add(FindCostMelee().ToString() + " Shade");
             * bms.costs.Add(FindCostHealth().ToString() + " Shade");
             * bms.costs.Add(FindCostMana().ToString() + " Shade");
             * bms.gameObject.SetActive(true);*/

            PlayerClass.main.skillTreeMenu.SetActive(true);
        }
        else if (interactions == 2)
        {
            interactions        = 0;
            bms.labels          = new List <string>();
            bms.purchaseActions = new List <UnityEngine.Events.UnityAction>();
            bms.costs           = new List <string>();
            bms.gameObject.SetActive(false);
            bms.destroyAllOptions();
        }
        return(null);
    }
예제 #6
0
 public Interaction Interact()
 {
     bms = PlayerClass.main.bms;
     if (interactions == 0)
     {
         interactions++;
         return(new Interaction(null, "Greetings. I can exchange your excess shade for some magical abilities.", Resources.GetBuiltinResource <Font>("Arial.ttf")));
     }
     else if (interactions == 1)
     {
         SkillTreeScript.sts.updateTemp();
         SpellTracker.main.Start2();
         interactions++;
         bms.purchaseActions = new List <UnityEngine.Events.UnityAction>();
         bms.purchaseActions.Add(spell1);
         bms.purchaseActions.Add(spell2);
         bms.purchaseActions.Add(spell3);
         //Debug.Log("shady" + bms.purchaseActions.Count);
         bms.labels = new List <string>();
         bms.labels.Add(SpellTracker.main.spells[s1].spellName);
         bms.labels.Add(SpellTracker.main.spells[s2].spellName);
         bms.labels.Add(SpellTracker.main.spells[s3].spellName);
         bms.costs = new List <string>();
         bms.costs.Add(p1 + " Shade");
         bms.costs.Add(p2 + " Shade");
         bms.costs.Add(p3 + " Shade");
         bms.gameObject.SetActive(true);
     }
     else if (interactions == 2)
     {
         interactions        = 0;
         bms.labels          = new List <string>();
         bms.purchaseActions = new List <UnityEngine.Events.UnityAction>();
         bms.costs           = new List <string>();
         bms.gameObject.SetActive(false);
         bms.destroyAllOptions();
     }
     return(null);
 }