コード例 #1
0
ファイル: Produce.cs プロジェクト: DigohD/Augotchi
    public Produce(
        string name,
        string imagePath,
        Inventory.ProduceType produceType,
        float hungerYield,
        float healthYield,
        float happinessYield,
        float strengthYield,
        float intelligenceYield,
        float agilityYield,
        int price,
        bool isEdible,
        Inventory.ItemRarity rarity
        )
    {
        this.name        = name;
        this.imagePath   = imagePath;
        this.produceType = produceType;

        this.hungerYield    = hungerYield;
        this.healthYield    = healthYield;
        this.happinessYield = happinessYield;

        this.strengthYield     = strengthYield;
        this.intelligenceYield = intelligenceYield;
        this.agilityYield      = agilityYield;

        this.price = price;

        this.isEdible = isEdible;
        this.rarity   = rarity;
    }
コード例 #2
0
    public void addFarmProduce(Inventory.ProduceType produceType, int amount)
    {
        inventory.produceCounts[(int)produceType] += amount;

        if (this.OnFarmHarvest != null)
        {
            this.OnFarmHarvest(this, new Quest.QuestEventArgs(1));
        }

        Save(false);
    }
コード例 #3
0
ファイル: MarkerPond.cs プロジェクト: DigohD/Augotchi
    protected override void executeEffect()
    {
        Inventory.ProduceType produceType = LootTable.GeneratePondLoot();

        string name = System.Enum.GetName(typeof(Inventory.ProduceType), produceType);

        int amount = Random.Range(1, 4);

        PetKeeper.pet.addWildProduce(produceType, amount);
        gc.queueRewardText(name.Replace("_", " ") + " +" + amount, Inventory.getRarityColor(Inventory.getProduceTypeInfo(produceType).rarity));

        InventoryUI.reRender = true;

        PetKeeper.pet.grantXP(50);
    }
コード例 #4
0
    public void addWildProduce(Inventory.ProduceType produceType, int amount)
    {
        inventory.produceCounts[(int)produceType] += amount;

        Save(false);
    }