Changeset 301

Show
Ignore:
Timestamp:
05/29/2012 01:10:35 PM (2 years ago)
Author:
andefodahl
Message:

Updated tutorial

Location:
traintris
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • traintris/comments.py

    r299 r301  
    77        comments = {} 
    88         
    9         comments["tutorial1"] = "Welcome to Chain of Life" 
    10         comments["tutorial2"] = "Hit Continue to recieve some\ngameplay instructions" 
    11         comments["tutorial3"] = "This is Ecoville, your personal\neco-reserve" 
    12         comments["tutorial4"] = "Your goal is to develop your\nreserve by adding plants and animals" 
    13         comments["tutorial5"] = "To add a plant or animal you\nmust select a type" 
    14         comments["tutorial6"] = "You can choose from plants,\nherbivores, carnivores, or humans at the top" 
    15         comments["tutorial7"] = "Below the top panel, you then\nrecieve a list or organisms of that type" 
    16         comments["tutorial8"] = "Each organism is different,\nmouse over them to see a description" 
    17         comments["tutorial9"] = "Your job is to make sure to\nplace things where they can grow" 
    18         comments["tutorial10"] = "They all have a listed food\nthat needs to be placed within their range" 
    19         comments["tutorial11"] = "If an organism has a range of\n2, its food must be withing 2 squares" 
    20         comments["tutorial12"] = "For instance, a squirrel needs\na tree within two squares" 
     9        comments["tutorial1"] = "Welcome to Chain of Life!" 
     10        comments["tutorial2"] = "Hit Continue to recieve some gameplay\ninstructions." 
     11        comments["tutorial3"] = "This is Ecoville, your personal eco-reserve." 
     12        comments["tutorial4"] = "Your goal is to develop your reserve by adding\nplants and animals!" 
     13        comments["tutorial5"] = "To add a plant or animal you must select a type," 
     14        comments["tutorial6"] = "You can choose from plants, herbivores, carnivores,\nor humans at the top." 
     15        comments["tutorial7"] = "Below the top panel, you then recieve a list or \n organisms of that type." 
     16        comments["tutorial8"] = "Each organism is different, mouse over them to see a\ndescription." 
     17        comments["tutorial9"] = "Your job is to make sure toplace things where\nthey can grow!" 
     18        comments["tutorial10"] = "They all have a listed food that needs to be placed\nwithin their range." 
     19        comments["tutorial11"] = "If an organism has a range of 2, its food must be\nwithing 2 squares." 
     20        comments["tutorial12"] = "For instance, a squirrel needs a tree within two\nsquares!" 
    2121        comments["tutorial13"] = "First off, try adding a plant\nto Ecoville!" 
    2222        comments["tutorial14"] = "Remember to place a summer plant!" 
  • traintris/graphics.py

    r299 r301  
    143143                self.drawText("Predators: " + predators, (20, ystart + 188), color, 20) 
    144144             
    145     def drawDialogBox(self, string1, string2, color): 
     145    def drawDialogBox(self, string1, string2, string3, string4, color): 
    146146        self.drawImage("dialogbox.png", ((self.screenwidth / 2) - 375, (self.screenheight / 2) - 300)) 
    147147        self.drawText(string1, ((self.screenwidth / 2) - 310, (self.screenheight / 2) - 240), color, 40) 
    148         self.drawText(string2, ((self.screenwidth / 2) -310, (self.screenheight / 2) - 120), color, 40) 
     148        self.drawText(string2, ((self.screenwidth / 2) -310, (self.screenheight / 2) - 160), color, 40) 
     149        self.drawText(string3, ((self.screenwidth / 2) -310, (self.screenheight / 2) - 80), color, 40) 
     150        self.drawText(string4, ((self.screenwidth / 2) -310, (self.screenheight / 2)), color, 40) 
    149151     
    150152    def drawMenuBox(self): 
     
    224226    #------------------------------------------------------------------------------------------------- 
    225227    # draws a button (pos is top-left) 
    226     def drawButton(self, text, size, images, mode, pos): 
    227      
    228         print "Drawing button" 
    229      
     228    def drawButton(self, text, size, images, mode, pos):     
    230229        if mode == CONSTANTS.NEUTRAL: 
    231230            image = images[CONSTANTS.NEUTRAL] 
  • traintris/tutorial.py

    r299 r301  
    2626     
    2727    def continueTutorial(self): 
    28         self.graphics.drawDialogBox(self.comments["tutorial" + str(self.counter)], self.comments["tutorial" + str(self.counter+1)], pygame.Color("black")) 
    29         print self.comments["tutorial" + str(self.counter)] 
    30         print self.comments["tutorial" + str(self.counter+1)] 
     28        string1 = self.comments["tutorial" + str(self.counter)] 
     29        string2 = self.comments["tutorial" + str(self.counter+1)] 
     30        if self.counter == 13: 
     31            string3 = "" 
     32            string4 = "" 
     33        else: 
     34            string3 = self.comments["tutorial" + str(self.counter+2)] 
     35            string4 = self.comments["tutorial" + str(self.counter+3)] 
     36        self.graphics.drawDialogBox(string1, string2, string3, string4, pygame.Color(138, 0, 0)) 
    3137        for button in self.buttonList: 
    3238            self.graphics.drawButton(button.text, button.size, button.images, button.mode, button.pos) 
     
    4147                    and event.y > button.pos[1] and event.y < button.pos[1]+button.size[1] \ 
    4248                    and event.type == 'up': 
    43                         if button.type == CONSTANTS.CATEGORY and self.counter < 13: 
    44                             print "Here as well" 
    45                             self.counter += 2 
     49                        if button.type == CONSTANTS.CATEGORY and self.counter < 11: 
     50                            self.counter += 4 
    4651                            self.continueTutorial() 
    47                         elif button.type == CONSTANTS.CATEGORY and self.counter > 12: 
     52                        elif button.type == CONSTANTS.CATEGORY and self.counter > 10: 
    4853                            ev = TutorialEnd() 
    4954                            self.evManager.Post(ev)