Ejemplo n.º 1
0
        public static void InitTesters()
        {
            for (int i = 0; i < 5; i++)
            {
                TestAvatar ta = new TestAvatar()
                {
                    Color    = Color.Red,
                    Side     = 1,
                    Position = i,
                    SMachine = new WsMachine().SetStates(new DemoTemplate()),
                    X        = 800 - 32
                };
                ta.SMachine.ChangeToState("start", ta);
                Hostiles.Add(ta);
            }

            for (int i = 0; i < 5; i++)
            {
                TestAvatar ta = new TestAvatar()
                {
                    Color    = Color.Cyan,
                    Side     = 0,
                    Position = i,
                    SMachine = new WsMachine().SetStates(new DemoTemplate())
                };
                ta.SMachine.ChangeToState("start", ta);
                Allies.Add(ta);
            }
        }
Ejemplo n.º 2
0
        private void DrawAvatar(Graphics gp, TestAvatar avatar)
        {
            Brush pen  = new SolidBrush(avatar.Color);
            Brush br   = new SolidBrush(Color.White);
            Font  font = new Font(FontFamily.GenericSansSerif, 10);
            Font  talk = new Font(FontFamily.GenericSansSerif, 9);

            gp.FillEllipse(pen, avatar.X, avatar.Y, 16, 16);
            gp.DrawString(avatar.Position.ToString(), font, br, avatar.X + 3, avatar.Y + 1);
            gp.DrawString(avatar.Talking, talk, br, avatar.X - 12, avatar.Y - 12);
        }