Exemple #1
0
    public bool OnInteraction(GameObject player)
    {
        if (!FlagHelper.IsSet(flags, ItemFlags.INTERACTABLE))
        {
            return(false);
        }

        if (FlagHelper.IsSet(flags, ItemFlags.LOOTABLE))
        {
            OnLootStart(player);
            LootHandler.OnLoot(this.gameObject, player);
            OnLootEnd(player);
        }

        return(true);
    }