Ejemplo n.º 1
0
    public void GainOres(Object requireObject, Global.OresTypes oresTypes, float oreAmount = 1.0f)
    {
        if (requireObject.GetType().Name == nameof(Ores) || requireObject.GetType().Name == nameof(FinalKey))
        {
            switch (oresTypes)
            {
            case Global.OresTypes.Ore_No1:
                this.oresAmount[oresTypes] += oreAmount;
                CheckWeightAmount();
                break;

            case Global.OresTypes.Special_Ore:
                baseSystem.GainOreToExtendTime(this);
                break;

            case Global.OresTypes.FinalKey:
                this.oresAmount[oresTypes] += oreAmount;
                Debug.Log((int)oresTypes + ", " + oreAmount);
                //CheckWeightAmount();
                break;
            }
        }
    }