コード例 #1
0
 public static bool CheckScent(UrbSubstanceTag Substance, UrbScentTag Scent)
 {
     if (SubstanceByScent.ContainsKey(Scent))
     {
         return(SubstanceByScent[Scent].Contains(Substance));
     }
     return(false);
 }
コード例 #2
0
    protected static bool UnregisterScent(UrbSubstanceTag Substance, UrbScentTag Scent)
    {
        if (SubstanceByScent.ContainsKey(Scent))
        {
            if (SubstanceByScent[Scent].Contains(Substance))
            {
                return(SubstanceByScent[Scent].Remove(Substance));
            }
        }

        return(false);
    }
コード例 #3
0
    protected static bool RegisterScent(UrbSubstanceTag Substance, UrbScentTag Scent)
    {
        if (!SubstanceByScent.ContainsKey(Scent))
        {
            SubstanceByScent.Add(Scent, new List <UrbSubstanceTag>());
        }

        if (SubstanceByScent[Scent].Contains(Substance))
        {
            return(false);
        }

        SubstanceByScent[Scent].Add(Substance);

        return(true);
    }