getPosition() public méthode

public getPosition ( ) : GrandLarceny.Position
Résultat GrandLarceny.Position
Exemple #1
0
 public void loadProgressClick(Button a_b)
 {
     for (int i = 0; i < 3; ++i)
     {
         if (m_buttons.ElementAt(i) == a_b)
         {
             if (!File.Exists("Content//levels//Slot " + (i+1) + ".prog"))
             {
                 m_newSaveName.getPosition().setGlobalX(a_b.getPosition().getGlobalX());
                 m_newSaveName.getPosition().setGlobalY(a_b.getPosition().getGlobalY());
                 m_newSaveName.setVisible(true);
                 m_newSaveName.setText("Enter the name");
                 m_newSaveName.setWrite(true);
                 m_saveTo = "Slot " + (i + 1) + ".prog";
             }
             else
             {
                 Game.getInstance().setProgress("Slot "+(i+1)+".prog", false);
                 Game.getInstance().setState(new HubMenu());
             }
         }
     }
 }
Exemple #2
0
        public void saveProgressClick(Button a_b)
        {
            int t_index = 4;
            for (int i = 0; i < 3; ++i)
            {
                if (m_buttons.ElementAt(i) == a_b)
                {
                    t_index = i+1;
                }
            }

            if (!File.Exists("Content//levels//Slot "+t_index+".prog"))
            {
                m_newSaveName.getPosition().setGlobalX(a_b.getPosition().getGlobalX());
                m_newSaveName.getPosition().setGlobalY(a_b.getPosition().getGlobalY());
                m_newSaveName.setVisible(true);
                m_newSaveName.setText("Enter the name");
                m_newSaveName.setWrite(true);
                m_saveTo = "Slot "+(t_index)+".prog";
            }
            else
            {
                Serializer.getInstance().saveGame(Serializer.getInstance().getFileToStream(a_b.getText(), true), Game.getInstance().getProgress());
            }
        }