Esempio n. 1
0
    void PrepareDudeJumping()
    {
        dude = new SHGUIview();
        SHGUIsprite s = new SHGUIsprite();

        s.AddSpecyficFrameFromFile("APPtreedudedude", 6, 0);
        s.frames [s.frames.Count - 1] = "\n" + s.frames [s.frames.Count - 1];
        s.AddSpecyficFrameFromFile("APPtreedudedude", 6, 1);
        s.AddSpecyficFrameFromFile("APPtreedudedude", 6, 2);
        s.frames [s.frames.Count - 1] = "\n" + s.frames [s.frames.Count - 1];

        s.loops = false;
        s.killOnAnimationComplete = false;
        s.animationSpeed          = .2f;

        s.x = 32 - 10;
        s.y = 7;

        dude.AddSubView(s);
    }
Esempio n. 2
0
 public static void TreeDudeSequence(SHGUIsprite s, string sequence)
 {
     for (int i = 0; i < sequence.Length; ++i)
     {
         if (sequence[i] == '|')
         {
             s.AddFrame("");
         }
         else if (sequence[i] == 'T')
         {
             s.AddFrame("\n" + SHGUI.current.GetASCIIartFromFont("TREE"));
         }
         else if (sequence[i] == 'D')
         {
             s.AddFrame("\n" + SHGUI.current.GetASCIIartFromFont("DUDE"));
         }
         else if (sequence[i] == '%')
         {
             s.AddFrame("\n" + SHGUI.current.GetASCIIartFromFont("DEAD"));
         }
         else if (sequence[i] == '0')
         {
             s.AddSpecyficFrameFromFile("APPtreedudedude", 6, 0);
         }
         else if (sequence[i] == '1')
         {
             s.AddSpecyficFrameFromFile("APPtreedudedude", 6, 1);
         }
         else if (sequence[i] == '2')
         {
             s.AddSpecyficFrameFromFile("APPtreedudedude", 6, 2);
         }
         else if (sequence[i] == '3')
         {
             s.AddSpecyficFrameFromFile("APPtreedudedude", 6, 3);
         }
     }
 }