Esempio n. 1
0
    void Start()
    {
        UIEventHandler.OnMoneyAdd += GiveMoney;
        if (Instance != null && Instance != this)
        {
            Destroy(gameObject);
        }
        else
        {
            Instance = this;
        }

        consumableController   = GetComponent <ConsumableController>();
        playerWeaponController = GetComponent <PlayerWeaponController>();
        playerArmorController  = GetComponent <PlayerArmorController>();
        //GiveItem("Test Sword");
        //GiveItem("Log Potion");
        GiveItem("Longsword");
        GiveItem("Leather Hat");
        GiveItem("Wooden Staff");
        //GiveItem("Leather Hat");
        GiveItem("Big Axe");
        //GiveItem("Leather Gloves");
        //GiveItem("Strength Necklace");
        //GiveItem("Big Axe");
    }
Esempio n. 2
0
 void Start()
 {
     player = GetComponent <Player>();
     if (Instance != null && Instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         Instance = this;
     }
     consumableController   = GetComponent <ConsumableController>();
     playerWeaponController = GetComponent <PlayerWeaponController>();
     playerArmorController  = GetComponent <PlayerArmorController>();
     //UIEventHandler.OnSkillLearn += Skills.Add;
 }