public static void MakeStinky(Mobile m, TimeSpan duration) { if (!Stinky.ContainsKey(m)) { Stinky.Add(m, DateTime.UtcNow + duration); } else { Stinky[m] = DateTime.UtcNow + duration; } }
private void Awake() { dispara = GetComponent <DisparoEnemigo>(); moverse = GetComponent <EnemigoToPlayer>(); oscila = GetComponentInParent <Oscilate>(); tripas = GetComponent <Tripas>(); gira = GetComponent <Flip>(); stinky = GetComponent <Stinky>(); anim = transform.GetComponentInParent <Animator>(); dragon = GetComponentInChildren <Dragon>(); piston = GetComponentInParent <Pistonn>(); }
public static bool CheckStinky(Mobile m) { if (Stinky.ContainsKey(m)) { if (Stinky[m] >= DateTime.UtcNow) { return(true); } Stinky.Remove(m); } return(false); }