private void SetBaddie(BaddieWord baddie) { if (activeBaddie != null) { activeBaddie.SetOn(false); } activeBaddie = baddie; if (activeBaddie != null) { activeBaddie.SetOn(true); } }
public bool WordTyped(BaddieWord baddie) { bool wordTyped = typeIndex >= word.Length; if (wordTyped) { fallDelay = 2f; if (baddie == null) { hitPoints--; } else { hitPoints -= (1 + baddie.power); } if (WordDead()) { Destroy(); } } return wordTyped; }