private void InitWithType(string Value, Color TextColor, int FontSize) { var Txt = Transform_.GetComponent <Text>(); Txt.text = Value; Txt.color = TextColor; Txt.fontSize = FontSize; Txt.fontStyle = FontStyle.Bold; var Motion = new MoveMotion(0.8f, new Vector3(0, 40, 0), true); Transform_.ExecuteMotion(new SequenceMotion(Motion, new CallbackMotion(() => { IsAlive = false; }))); }
private void InitWithType(NumberLabelType Type, string Value) { var Txt = Transform_.GetComponent <Text>(); Txt.text = Value; switch (Type) { case NumberLabelType.Float: Txt.color = Color.red; Txt.fontSize = 14; break; case NumberLabelType.Bomb: Txt.color = Color.yellow; Txt.fontSize = 14; break; case NumberLabelType.Laser: Txt.color = Color.green; Txt.fontSize = 30; break; default: break; } var Motion = CreateMotion(Type); if (Motion != null) { Transform_.ExecuteMotion(new SequenceMotion(Motion, new CallbackMotion(() => { IsAlive = false; }))); } else { IsAlive = false; } }