Ignore:
Timestamp:
06/08/09 04:01:46 (11 years ago)
Author:
maximinus_parpg
Message:

Objects now highlight on mouse over.
Object right-clicking is pixel base, not tile based.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PARPG/scripts/engine.py

    r77 r104  
    157157                                 i[3], i[4])) 
    158158 
     159    def objectActive(self, ident): 
     160        """Given the objects ID, pass back the object if it is active, 
     161           False if it doesn't exist or not displayed""" 
     162        for i in self.objects: 
     163            if((i.display == True)and(i.id == ident)): 
     164                # we found a match 
     165                return i 
     166        # now try NPC's 
     167        for i in self.npcs: 
     168            # all NPC's are deemed active 
     169            if(i.id == ident): 
     170                return i 
     171        # no match 
     172        return False 
     173 
    159174    def getObjectText(self, xpos, ypos): 
    160175        """Get the objects id and description of itself""" 
Note: See TracChangeset for help on using the changeset viewer.