コード例 #1
0
ファイル: BattleProcessor.cs プロジェクト: britg/ptq
    public void Consumables()
    {
        if (tpd.RollPercent(currentMob.consumableChance)) {
          //if (true) {
          var env = sim.currentEnvironment;
          var consumableKey = tpd.RollMap(env.consumableChances);
          var consumableGenerator = new ConsumableGenerator(sim);
          var consumable = consumableGenerator.Generate(consumableKey);
          var ev = PlayerEvent.Consumable(consumable);

          sim.AddEvent(ev);
        }
    }
コード例 #2
0
ファイル: BattleProcessor.cs プロジェクト: britg/ptq
    public void Consumables()
    {
        if (tpd.RollPercent(currentMob.consumableChance))
        {
            //if (true) {
            var env                 = sim.currentEnvironment;
            var consumableKey       = tpd.RollMap(env.consumableChances);
            var consumableGenerator = new ConsumableGenerator(sim);
            var consumable          = consumableGenerator.Generate(consumableKey);
            var ev = PlayerEvent.Consumable(consumable);

            sim.AddEvent(ev);
        }
    }
コード例 #3
0
    public void Generate()
    {
        var rand = Random.Range(0, 2);

        if (rand == 0)
        {
            _equipmentGenerator.category = (Equipment.Category)rand;
            _equipmentGenerator.Generate();
        }
        else
        {
            _consumableGenerator.category = (Consumable.Category)rand;
            _consumableGenerator.Generate();
        }
    }