Ejemplo n.º 1
0
        public void init(GameManager gm, Player p, WorldMap w)
        {
            this.gm = gm;
            this.p  = p;
            this.w  = w;

            state = State.Default;

            note = new GameObject("UI Notification").AddComponent <UINotification> ();
            note.init();
            note.transform.parent = gm.pc.transform;

            hl = new GameObject("UI Highlight").AddComponent <UIHighlight> ();
            hl.init(this);
            hl.transform.parent = transform;

            mv = new GameObject("UI Movement").AddComponent <UIMovement> ();
            mv.init(this);

            tm = new GameObject("Tutorial Manager").AddComponent <TutorialManager>();
            tm.init();
            tm.transform.parent = transform;

            mmm = gameObject.AddComponent <MinimapManager>();
            mmm.transform.parent = transform;

            helper = gameObject.AddComponent <HelperUI>();
            helper.init(this);

            showHelp = false;
        }
Ejemplo n.º 2
0
 public bool GetHighlight(out UIHighlight h)
 {
     if (this.selectPos.position < this.carratPos.position)
     {
         if (this.carratPos.valid && this.selectPos.valid)
         {
             h.a.i = this.selectPos.position;
             h.a.L = this.selectPos.line;
             h.a.C = this.selectPos.column;
             h.b.i = this.carratPos.position;
             h.b.L = this.carratPos.line;
             h.b.C = this.carratPos.column;
             return(true);
         }
     }
     else if (((this.selectPos.position > this.carratPos.position) && this.carratPos.valid) && this.selectPos.valid)
     {
         h.b.i = this.selectPos.position;
         h.b.L = this.selectPos.line;
         h.b.C = this.selectPos.column;
         h.a.i = this.carratPos.position;
         h.a.L = this.carratPos.line;
         h.a.C = this.carratPos.column;
         return(true);
     }
     h = UIHighlight.invalid;
     return(false);
 }
Ejemplo n.º 3
0
 public bool GetHighlight(out UIHighlight h)
 {
     h = new UIHighlight();
     if (this.selectPos.position < this.carratPos.position)
     {
         if (this.carratPos.valid && this.selectPos.valid)
         {
             h.a.i = this.selectPos.position;
             h.a.L = this.selectPos.line;
             h.a.C = this.selectPos.column;
             h.b.i = this.carratPos.position;
             h.b.L = this.carratPos.line;
             h.b.C = this.carratPos.column;
             return true;
         }
     }
     else if (this.selectPos.position > this.carratPos.position && this.carratPos.valid && this.selectPos.valid)
     {
         h.b.i = this.selectPos.position;
         h.b.L = this.selectPos.line;
         h.b.C = this.selectPos.column;
         h.a.i = this.carratPos.position;
         h.a.L = this.carratPos.line;
         h.a.C = this.carratPos.column;
         return true;
     }
     h = UIHighlight.invalid;
     return false;
 }