private void LocalHandler(GameEvent e) { if (e.GetType() == typeof(GE_Air)) { GE_Air a = (GE_Air)e; if (a.howMuch <= 0) { if ((a.speaker == Speaker.Ops && gameObject.name == "Character0") || (a.speaker == Speaker.Doc && gameObject.name == "Character1")) { Drown(); } } } }
void LocalHandler(GameEvent e) { if (e.GetType() == typeof(GE_Air)) { GE_Air a = (GE_Air)e; if (a.speaker == thisSpeaker) { airAmt = a.howMuch; if (a.howMuch > midColorThres) { newColor = fullColor; } else if (a.howMuch <= midColorThres && a.howMuch > lowColorThresh) { newColor = midColor; } else if (a.howMuch <= lowColorThresh) { newColor = lowColor; } } } }