예제 #1
0
 public void Add(SleepLab.Action action)
 {
     SleepLab.Action[] t = new SleepLab.Action[actionlist.Length + 1];
     for (int i = 0; i < actionlist.Length; i++)
     {
         t[i] = actionlist[i];
     }
     t[t.Length - 1] = action;
     actionlist      = t;
 }
예제 #2
0
 public void ApplyAction(SleepLab.Action sla)
 {
     if (sla.iname == "Bean Bag 1")
     {
         beanbags[0] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Bean Bag 2")
     {
         beanbags[1] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Teddy Bear")
     {
         teddybear = sla.istate == "Toggled on";
     }
     if (sla.iname == "Bed")
     {
         bedcolor = sla.cnumber;
     }
     if (sla.iname == "Boat 1")
     {
         boats[0] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Boat 2")
     {
         boats[1] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Books 1")
     {
         books[0] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Books 2")
     {
         books[1] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Car 1")
     {
         cars[0] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Car 2")
     {
         cars[1] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Chair")
     {
         chair = sla.istate == "Toggled on";
     }
     if (sla.iname == "Drum")
     {
         drum = sla.istate == "Toggled on";
     }
     if (sla.iname == "Elephant 1")
     {
         elephants[0] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Elephant 2")
     {
         elephants[1] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Fan")
     {
         fan = sla.cnumber;
     }
     if (sla.iname == "Giraffe")
     {
         giraffe = sla.istate == "Toggled on";
     }
     if (sla.iname == "Guitar")
     {
         guitar = sla.istate == "Toggled on";
     }
     if (sla.iname == "Lamp 1")
     {
         lamp1 = sla.istate == "Toggled on";
     }
     if (sla.iname == "Lamp 2")
     {
         lamp2 = sla.istate == "Toggled on";
     }
     if (sla.iname == "Lamp 3")
     {
         lamp3 = sla.istate == "Toggled on";
     }
     if (sla.iname == "Laptop")
     {
         laptop = sla.istate == "Toggled on";
     }
     if (sla.iname == "Makeup 1")
     {
         makeup[0] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Makeup 2")
     {
         makeup[1] = sla.istate == "Toggled on";
     }
     if (sla.iname == "Airplane")
     {
         airplane = sla.istate == "Toggled on";
     }
     if (sla.iname == "Plant")
     {
         plant = sla.istate == "Toggled on";
     }
     if (sla.iname == "Stereo 1")
     {
         stereo1 = sla.istate == "Toggled on";
     }
     if (sla.iname == "Stereo 2")
     {
         stereo2 = sla.istate == "Toggled on";
     }
     if (sla.iname == "TV")
     {
         tv = sla.istate == "Toggled on";
     }
     if (sla.iname == "Wall")
     {
         wallcolor = sla.cnumber;
     }
     if (sla.iname == "Poster")
     {
         poster = sla.istate == "Toggled on";
     }
 }