Ejemplo n.º 1
0
 public Root(NPC e, Behaviour b)
 {
     this.entity = e;
     this.behaviour = b;
     //Add this entity to the context
     context.Add("entity", entity);
 }
Ejemplo n.º 2
0
        public void showDialogueModal(NPC sender, string imageName, string text)
        {
            Gwen.Control.WindowControl w = new Gwen.Control.WindowControl(_canvas, sender.name, true);
            w.Width = 320;
            w.Height = 170;
            Align.Center(w);

            Gwen.Control.ImagePanel img = new Gwen.Control.ImagePanel(w);
            img.ImageName = "./assets/" + imageName;
            img.SetPosition(5, 10);
            img.SetSize(120, 120);

            Gwen.Control.RichLabel label = new Gwen.Control.RichLabel(w);
            String[] textLines = text.Split(new Char[]{'/'});
            for (int i = 0; i < textLines.Length; i++ )
            {
                label.AddText(textLines[i], System.Drawing.Color.Black, HUD.defaultFont);
                label.AddLineBreak();
            }
            label.SetPosition(130, 10);
            label.SetSize(320 - 130, w.Height - 20);
        }