示例#1
0
 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>();
 }
示例#3
0
        public static bool CheckStinky(Mobile m)
        {
            if (Stinky.ContainsKey(m))
            {
                if (Stinky[m] >= DateTime.UtcNow)
                {
                    return(true);
                }

                Stinky.Remove(m);
            }

            return(false);
        }