Beispiel #1
0
 def setupControls(self, avatarRadius = 1.4, floorOffset = OTPGlobals.FloorOffset, reach = 4.0, wallBitmask = OTPGlobals.WallBitmask, floorBitmask = OTPGlobals.FloorBitmask, ghostBitmask = OTPGlobals.GhostBitmask):
     walkControls = GravityWalker(legacyLifter=self.wantLegacyLifter())
     walkControls.setWallBitMask(wallBitmask)
     walkControls.setFloorBitMask(floorBitmask)
     walkControls.initializeCollisions(self.cTrav, self, avatarRadius, floorOffset, reach)
     walkControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(walkControls, 'walk')
     self.physControls = walkControls
     twoDControls = TwoDWalker()
     twoDControls.setWallBitMask(wallBitmask)
     twoDControls.setFloorBitMask(floorBitmask)
     twoDControls.initializeCollisions(self.cTrav, self, avatarRadius, floorOffset, reach)
     twoDControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(twoDControls, 'twoD')
     swimControls = SwimWalker()
     swimControls.setWallBitMask(wallBitmask)
     swimControls.setFloorBitMask(floorBitmask)
     swimControls.initializeCollisions(self.cTrav, self, avatarRadius, floorOffset, reach)
     swimControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(swimControls, 'swim')
     ghostControls = GhostWalker()
     ghostControls.setWallBitMask(ghostBitmask)
     ghostControls.setFloorBitMask(floorBitmask)
     ghostControls.initializeCollisions(self.cTrav, self, avatarRadius, floorOffset, reach)
     ghostControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(ghostControls, 'ghost')
     observerControls = ObserverWalker()
     observerControls.setWallBitMask(ghostBitmask)
     observerControls.setFloorBitMask(floorBitmask)
     observerControls.initializeCollisions(self.cTrav, self, avatarRadius, floorOffset, reach)
     observerControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(observerControls, 'observer')
     self.controlManager.use('walk', self)
     self.controlManager.disable()
Beispiel #2
0
 def setupControls(self, avatarRadius = 1.4, floorOffset = OTPGlobals.FloorOffset, reach = 4.0, wallBitmask = OTPGlobals.WallBitmask, floorBitmask = OTPGlobals.FloorBitmask, ghostBitmask = OTPGlobals.GhostBitmask):
     walkControls = GravityWalker(legacyLifter=self.wantLegacyLifter())
     walkControls.setWallBitMask(wallBitmask)
     walkControls.setFloorBitMask(floorBitmask)
     walkControls.initializeCollisions(self.cTrav, self, avatarRadius, floorOffset, reach)
     walkControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(walkControls, 'walk')
     self.physControls = walkControls
     twoDControls = TwoDWalker()
     twoDControls.setWallBitMask(wallBitmask)
     twoDControls.setFloorBitMask(floorBitmask)
     twoDControls.initializeCollisions(self.cTrav, self, avatarRadius, floorOffset, reach)
     twoDControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(twoDControls, 'twoD')
     swimControls = SwimWalker()
     swimControls.setWallBitMask(wallBitmask)
     swimControls.setFloorBitMask(floorBitmask)
     swimControls.initializeCollisions(self.cTrav, self, avatarRadius, floorOffset, reach)
     swimControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(swimControls, 'swim')
     ghostControls = GhostWalker()
     ghostControls.setWallBitMask(ghostBitmask)
     ghostControls.setFloorBitMask(floorBitmask)
     ghostControls.initializeCollisions(self.cTrav, self, avatarRadius, floorOffset, reach)
     ghostControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(ghostControls, 'ghost')
     observerControls = ObserverWalker()
     observerControls.setWallBitMask(ghostBitmask)
     observerControls.setFloorBitMask(floorBitmask)
     observerControls.initializeCollisions(self.cTrav, self, avatarRadius, floorOffset, reach)
     observerControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(observerControls, 'observer')
     self.controlManager.use('walk', self)
     self.controlManager.disable()
Beispiel #3
0
 def setupControls(self):
     walkControls = GravityWalker(legacyLifter=self.wantLegacyLifter())
     walkControls.setWallBitMask(WallBitmask)
     walkControls.setFloorBitMask(FloorBitmask)
     walkControls.initializeCollisions(
         self.cTrav, self, avatarRadius=AvatarDefaultRadius, floorOffset=FloorOffset, reach=4
     )
     walkControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.physControls = walkControls
     self.controlManager.add(walkControls, 'walk')
     swimControls = SwimWalker()
     swimControls.setWallBitMask(WallBitmask)
     swimControls.setFloorBitMask(FloorBitmask)
     swimControls.initializeCollisions(
         self.cTrav, self, avatarRadius=AvatarDefaultRadius, floorOffset=FloorOffset, reach=4
     )
     swimControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(swimControls, 'swim')
     self.controlManager.use('walk', self)
     self.controlManager.disable()
Beispiel #4
0
 def setupControls(self):
     walkControls = GravityWalker(legacyLifter=self.wantLegacyLifter())
     walkControls.setWallBitMask(WallBitmask)
     walkControls.setFloorBitMask(FloorBitmask)
     walkControls.initializeCollisions(
         self.cTrav, self, avatarRadius=AvatarDefaultRadius, floorOffset=FloorOffset, reach=4
     )
     walkControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.physControls = walkControls
     self.controlManager.add(walkControls, 'walk')
     swimControls = SwimWalker()
     swimControls.setWallBitMask(WallBitmask)
     swimControls.setFloorBitMask(FloorBitmask)
     swimControls.initializeCollisions(
         self.cTrav, self, avatarRadius=AvatarDefaultRadius, floorOffset=FloorOffset, reach=4
     )
     swimControls.setAirborneHeightFunc(self.getAirborneHeight)
     self.controlManager.add(swimControls, 'swim')
     self.controlManager.use('walk', self)
     self.controlManager.disable()