Esempio n. 1
0
        public async Task <bool> CheckAsync(Player player)
        {
            if (!string.IsNullOrWhiteSpace(Condition))
            {
                if (!await Requirements.CheckRequirementsAsync(Condition, player))
                {
                    return(false);
                }
            }

            if (OnMissions.Count != default)
            {
                var inventory = player.GetComponent <MissionInventoryComponent>();

                foreach (var mission in OnMissions)
                {
                    if (!await inventory.OnMissionAsync(mission))
                    {
                        return(false);
                    }
                }
            }

            return(true);
        }