Пример #1
0
    public override void Deactivate()
    {
        base.Deactivate();
        PlayerController.Instance.inventory.AddItem(this);

        ExperienceController controller = PlayerController.Instance.experience;

        controller.AddStrenght(-strenghtBonus, true);
        controller.AddStamina(-staminaBonus, true);
        controller.AddMind(-mindBonus, true);
        controller.AddWillpower(-willpowerBonus, true);

        DefenceConfig defence = PlayerController.Instance.defence;

        defence.physical     -= defenceBonus.physical;
        defence.fire         -= defenceBonus.fire;
        defence.ice          -= defenceBonus.ice;
        defenceBonus.electro -= defenceBonus.electro;
    }
Пример #2
0
    public override void Activate()
    {
        base.Activate();
        PlayerController.Instance.inventory.SetWearable(this);
        SoundController.Play("equip");

        ExperienceController controller = PlayerController.Instance.experience;

        controller.AddStrenght(strenghtBonus, true);
        controller.AddStamina(staminaBonus, true);
        controller.AddMind(mindBonus, true);
        controller.AddWillpower(willpowerBonus, true);

        DefenceConfig defence = PlayerController.Instance.defence;

        defence.physical     += defenceBonus.physical;
        defence.fire         += defenceBonus.fire;
        defence.ice          += defenceBonus.ice;
        defenceBonus.electro += defenceBonus.electro;
    }