コード例 #1
0
ファイル: Data.py プロジェクト: hackerj/Treasure-Hunting-Game
 def loadSavedGame(self):
     
     loadNewGame(self, "load.txt", True)  # Initialize data from file
     
     self.view = View(self)      # Initialize view
     loadGraphics(self)          # Initialize graphics
     self.view.guiMain.personView.centerOn(self.character.pViewObj); # Center on the character
   
     # Set boundaries (Hard Coded values at the mommment perhaps 
     # implement automatic bounds checking later)
     self.maxX = 1768
     self.minX = -2024
     self.maxY = 2024
     self.minY = -2024
     
     #Add overlays
     
     self.overlays['latLongOverlay'].mViewObj.setVisible(False)
     self.overlays['colorOverlay'].mViewObj.setVisible(False)
     self.overlays['legendOverlay'].mViewObj.setVisible(False)
     
     #Initial search yields first clue.
     searchLandmark(self)
     
     #Initialize frames
     initFrames(self)
コード例 #2
0
ファイル: Data.py プロジェクト: hackerj/Treasure-Hunting-Game
    def loadDataInitial(self):
        """Initialize with heap objects"""
        
        loadData(self)
        self._initialNewGame() # Load data before init view
        self.view = View(self)      # Initialize view
        loadGraphics(self)          # Initialize graphics
        self.view.guiMain.personView.centerOn(self.character.pViewObj); # Center on the character

        # Set boundaries (Hard Coded values at the mommment perhaps 
        # implement automatic bounds checking later)
        self.maxX = 1768
        self.minX = -2024
        self.maxY = 2024
        self.minY = -2024
        
        #Add overlays
        self.overlays['latLongOverlay'].mViewObj.setVisible(False)
        self.overlays['colorOverlay'].mViewObj.setVisible(False)
        self.overlays['legendOverlay'].mViewObj.setVisible(False)
        
        #Initial search yields first clue.
        searchLandmark(self)
        
        #Initialize frames
        initFrames(self)