Esempio n. 1
0
 def __init__(self, cr):
     ModPlayer.__init__(self, cr)
     BaseLocalAvatar.__init__(self)
     self.moneyGui = MoneyGUI()
     self.waveGui = WaveGUI()
     self.waveReportGui = WaveReportGUI()
     self.codeGUI = CodeGUI()
Esempio n. 2
0
    def __init__(self, cr):
        try:
            self.LocalToon_initialized
            return
        except:
            self.LocalToon_initialized = 1
        DistributedPlayerToon.__init__(self, cr)
        BaseLocalAvatar.__init__(self)
        self.chatInputState = False
        self.avatarChoice = cr.localAvChoice
        self.chatInput = ChatInput()
        self.positionExaminer = PositionExaminer()
        self.friendRequestManager = FriendRequestManager()
        self.friendsList = FriendsList()
        self.questManager = QuestManager(self)
        self.questUpdateGUI = QuestUpdateGUI()
        self.panel = ToonPanel()
        self.firstTimeGenerating = True
        friendsgui = loader.loadModel(
            'phase_3.5/models/gui/friendslist_gui.bam')
        self.friendButton = DirectButton(
            geom=(friendsgui.find('**/FriendsBox_Closed'),
                  friendsgui.find('**/FriendsBox_Rollover'),
                  friendsgui.find('**/FriendsBox_Rollover')),
            text=("", "Friends", "Friends", ""),
            text_fg=(1, 1, 1, 1),
            text_shadow=(0, 0, 0, 1),
            text_scale=0.09,
            text_pos=(0, -0.18),
            relief=None,
            parent=base.a2dTopRight,
            pos=(-0.141, 0, -0.125),
            command=self.friendsButtonClicked,
            scale=0.8)
        friendsgui.removeNode()
        del friendsgui
        self.hideFriendButton()
        self.runSfx = base.loadSfx(
            "phase_3.5/audio/sfx/AV_footstep_runloop.ogg")
        self.runSfx.setLoop(True)
        self.walkSfx = base.loadSfx(
            "phase_3.5/audio/sfx/AV_footstep_walkloop.ogg")
        self.walkSfx.setLoop(True)
        self.offset = 3.2375
        self.firstPersonCamPos = None
        self.movementKeymap = {
            "forward": 0,
            "backward": 0,
            "left": 0,
            "right": 0,
            "jump": 0
        }
        self.avatarMovementEnabled = False
        self.isMoving_forward = False
        self.isMoving_side = False
        self.isMoving_back = False
        self.isMoving_jump = False
        self.gagThrowBtn = None

        self.pickerTrav = None
        self.pickerRay = None
        self.pickerRayNode = None
        self.pickerHandler = None
        self.rolledOverTag = None

        self.clickToonCallback = None

        self.inTutorial = False
        self.hasDoneJump = False
        self.lastState = None
        self.lastAction = None

        self.jumpHardLandIval = None

        # This is used by CutsceneGUI
        self.allowA2dToggle = True

        # This is used by the animation traverser.
        self.__traverseGUI = None