コード例 #1
0
    public void TryInteract(BasicCharacter character)
    {
        if (character.FuelHeld)
        {
            IFuel fuel = character.HeldObject as IFuel;
            if (fuel != null)
            {
                _globals.FireplaceHealth += fuel.GetFuelAmount();
            }

            character.DestroyHeldObject();
            _tooltip.FadeOut();
        }
    }
コード例 #2
0
ファイル: Kindling.cs プロジェクト: spencer-melnick/hearth
    public void TryInteract(BasicCharacter character)
    {
        if (CanInteract)
        {
            if (TooltipEnabled)
            {
                InteractTooltip tooltip = GetNode(TooltipPath) as InteractTooltip;

                tooltip?.FadeOut();
            }

            CanInteract = false;
            character.PickupObject(this);
        }
    }
コード例 #3
0
    public void TryInteract(BasicCharacter character)
    {
        if (character.FuelHeld)
        {
            IFuel fuel = character.HeldObject as IFuel;
            if (fuel != null)
            {
                _globals.NewFireplaceHealth += fuel.GetFuelAmount();

                if (!Lit)
                {
                    _animationPlayer.Play("flash");
                }
            }

            character.DestroyHeldObject();
            _tooltip.FadeOut();
        }
    }