예제 #1
0
    public bool DiscardItem(ItemData id)
    {
        bool b = inventory.RemoveItem(id);

        SaveLoadHanlder.Save(inventory, "/Inventory.dat", true);
        LootFactory.Instance.SpawnLootAroundPoint(CharacterController_2D.Instance.transform.position, id, 1);
        return(b);
    }
예제 #2
0
 public void ScanCurrentTexture()
 {
     currentProfile.StartNewScan(baseSprite.texture, trainSpeed);
     currentProfile.ApplyWeightedTexture(targetImage, Exploration);
     if (ShouldLoadSave)
     {
         SaveLoadHanlder.Save(currentProfile, currentProfile.SavePath, false);
     }
 }
예제 #3
0
    public bool DestroyAllOfItem(ItemData id)
    {
        bool b = true;

        while (b)
        {
            b = inventory.RemoveItemByID(id.name);
        }
        SaveLoadHanlder.DeleteWeapon(id.name);
        SaveLoadHanlder.Save(inventory, "/Inventory.dat", true);
        return(true);
    }
예제 #4
0
 public void AddItem(ItemData i)
 {
     inventory.AddItem(i);
     SaveLoadHanlder.Save(inventory, "/Inventory.dat", true);
 }
예제 #5
0
 public void Save()
 {
     SaveLoadHanlder.Save(this, SavePath);
 }