Пример #1
0
 public void Apply(GarnishType garnish, GameObject garnishObject)
 {
     LastStep.Garnishes.Add(garnish);
     garnishObject.transform.SetParent(GarnishParent);
     garnishObject.transform.position = new Vector3(
         GarnishParent.transform.position.x + (Random.value - 0.5f) * GarnishSpread,
         GarnishParent.transform.position.y + (Random.value - 0.5f) * GarnishSpread,
         garnishObject.transform.position.z
         );
 }
Пример #2
0
    public AlienLetter GetLetter(GarnishType garnish, List <AlienLetter> variants)
    {
        foreach (var variant in variants)
        {
            if (variant.Garnish == garnish)
            {
                return(variant);
            }
        }

        foreach (var letter in CanonicalLetters)
        {
            if (letter.Garnish == garnish)
            {
                return(letter);
            }
        }

        return(null);
    }