def replaceFish(self, fish):
     depth = fish.myData["depth"]
     index = fish.index
     self.fishHistogram[fish.myData["id"]][0] -= 1
     self.uncaughtFish.remove(fish)
     fish.destroy()
     fishData = FishingGlobals.giveMeAFish(self.location, depth, self.fishHistogram)
     f = Fish(self, fishData, index)
     f.fsm.request("Offscreen")
     self.fishHistogram[f.myData["id"]][0] += 1
     f.pickPositionAndSwim()
     self.uncaughtFish.append(f)
Beispiel #2
0
 def replaceFish(self, fish):
     depth = fish.myData['depth']
     index = fish.index
     self.fishHistogram[fish.myData['id']][0] -= 1
     self.uncaughtFish.remove(fish)
     fish.destroy()
     fishData = FishingGlobals.giveMeAFish(self.location, depth,
                                           self.fishHistogram)
     f = Fish(self, fishData, index)
     f.fsm.request('Offscreen')
     self.fishHistogram[f.myData['id']][0] += 1
     f.pickPositionAndSwim()
     self.uncaughtFish.append(f)
    def loadFish(self):
        rodSize = self.gameObject.getAvatarsBestRod()
        for depth in range(len(FishingGlobals.fishCountRangePerRodPerLevel[rodSize])):
            numberOfFishForThisLevel = random.randint(
                FishingGlobals.fishCountRangePerRodPerLevel[rodSize][depth][0],
                FishingGlobals.fishCountRangePerRodPerLevel[rodSize][depth][1],
            )
            for fishIndex in range(numberOfFishForThisLevel):
                fishData = FishingGlobals.giveMeAFish(self.location, depth, self.fishHistogram)
                f = Fish(self, fishData, len(self.uncaughtFish))
                self.fishHistogram[f.myData["id"]][0] += 1
                f.fsm.request("Offscreen")
                self.uncaughtFish.append(f)

            self.legendaryFish = None
Beispiel #4
0
    def loadFish(self):
        rodSize = self.gameObject.getAvatarsBestRod()
        for depth in range(
                len(FishingGlobals.fishCountRangePerRodPerLevel[rodSize])):
            numberOfFishForThisLevel = random.randint(
                FishingGlobals.fishCountRangePerRodPerLevel[rodSize][depth][0],
                FishingGlobals.fishCountRangePerRodPerLevel[rodSize][depth][1])
            for fishIndex in range(numberOfFishForThisLevel):
                fishData = FishingGlobals.giveMeAFish(self.location, depth,
                                                      self.fishHistogram)
                f = Fish(self, fishData, len(self.uncaughtFish))
                self.fishHistogram[f.myData['id']][0] += 1
                f.fsm.request('Offscreen')
                self.uncaughtFish.append(f)

            self.legendaryFish = None