Exemple #1
0
        public Unit(Character fleader, int x, int y)
        {
            deployed = false;

            map = new Character[4, 4];
            leader = fleader;
            name = leader.Name;

            dead = false;
            org = "main";

            map[x, y] = leader;
            leader.Position = new Point(x, y);

            us = Graphic.getSprite(leader);
            inv = new Inventory();

            resetMovement();
        }
Exemple #2
0
        public Unit(Character fleader, String n, String forg)
        {
            deployed = false;

            map = new Character[5, 5];
            leader = fleader;
            name = n;
            dead = false;
            inv = new Inventory();

            org = forg;

            map[0, 0] = leader;
            leader.Position = new Point(0, 0);

            us = Graphic.getSprite(leader);

            resetMovement();
        }
Exemple #3
0
        public void setLeader(int x, int y)
        {
            Character c=map[x, y];

            if (c != null)
                leader = c;

            us = Graphic.getSprite(leader);
        }
Exemple #4
0
        private void init(Screen display, bool fismain)
        {
            parent = display;
            ismain = fismain;

            if (ismain)
            {
                pos = new Vector2(0, 0);
                size = new Vector2(Game1.Instance.Window.ClientBounds.Width, Game1.Instance.Window.ClientBounds.Height);
            }
            else
            {
                pos = new Vector2(10, 10);
                size = new Vector2(100, 100);
            }

            bg = Content.Graphics.Instance.Images.background.black;

            fm = new FocusManager();
            hasFocus = false;
        }