示例#1
0
        public void MineField(SFML.Window.Vector2u Index)
        {
            Index = Index / 2;
            Index = Index * 2;
            {
                for (int i = 0; i < 2; i++)
                {
                    for (int j = 0; j < 2; j++)
                    {
                        m_map[Index.X + i, Index.Y + j].m_type = FieldType.Free;
                    }
                }
            }

            for (int i = -3; i < 3; i++)
            {
                for (int j = -3; j < 3; j++)
                {
                    if (Index.X + i >= 0 && Index.Y + j >= 0 && Index.X + i < 50 && Index.Y + j < 50)
                    {
                        m_map[Index.X + i, Index.Y + j].initialize();
                    }
                }
            }
        }
示例#2
0
 public override void loadContent()
 {
     SFML.Window.Vector2u middle = sprite.Texture.Size;
     sprite.Origin = new SFML.Window.Vector2f(middle.X / 2, middle.Y / 2);
 }