Example #1
0
 public static Jellyfish CreateJellyfish(int x, int y, Directions direction)
 {
     if (currentJellyfish == null)
     {
         lock (putlock)
         {
             if (currentJellyfish == null)
             {
                 currentJellyfish = new Jellyfish();
             }
         }
     }
     currentJellyfish.x         = x;
     currentJellyfish.y         = y;
     currentJellyfish.Direction = direction;
     return(currentJellyfish);
 }
Example #2
0
 //methods--------------------
 public void SetJellyfishOrigin(int x, int y, string direction)
 {
     jellyfish     = Jellyfish.CreateJellyfish(x, y, GetDirection(direction));
     lostJellyfish = false;
 }