Ejemplo n.º 1
0
 private void CodeGame_FormClosing(object sender, FormClosingEventArgs e)
 {
     Moving.Position    position    = new Moving.Position(pbPlayer.Location);
     Moving.PosSaveFile posSaveFile = new Moving.PosSaveFile();
     posSaveFile.Save(position);
     Moving.RotateFileSave rotateSave = new Moving.RotateFileSave();
     rotateSave.Save(rotateSave.Load());
     Launcher.MyForm.Close();
 }
Ejemplo n.º 2
0
        public CodeGame()
        {
            InitializeComponent();

            Moving.RotateFileSave rotatef = new Moving.RotateFileSave();
            Moving.Rotate         rotate  = new Moving.Rotate();
            rotate      = rotatef.Load();
            label1.Text = $"Top : {rotate.isTop}\nLeft : {rotate.isLeft}\nRight : {rotate.isRight}\nDown : {rotate.isBack}";



            lastPos = new Point();
            MyForm  = this;
            GeneratePlayerPosition generatePlayerPosition = new GeneratePlayerPosition();

            generatePlayerPosition.GenerateRandomPosition();
        }