コード例 #1
0
    def OnLoadGamePlay(self):
        tokenmgr = GERules.GetTokenMgr()

        tokenmgr.SetupToken(self.TOKEN1,
                            location=Glb.SPAWN_TOKEN,
                            limit=self.token_count,
                            glow_color=Color(0, 255, 0, 120),
                            respawn_delay=10)

        tokenmgr.SetupToken(
            self.TOKEN2,
            location=Glb.SPAWN_TOKEN,
            limit=1,
            glow_color=Color(0, 0, 255, 120),
            respawn_delay=10,
            world_model="models/weapons/goldengun/w_goldengun.mdl",
            view_model="models/weapons/goldengun/v_goldengun.mdl",
            print_name="Golden Gun")

        tokenmgr.SetupCaptureArea("cap1",
                                  limit=self.token_count,
                                  location=Glb.SPAWN_CAPAREA,
                                  rqd_token=self.TOKEN1,
                                  spread=1000,
                                  glow_color=Color(0, 255, 0, 120))

        tokenmgr.SetupCaptureArea("cap2",
                                  limit=1,
                                  location=Glb.SPAWN_CAPAREA,
                                  spread=600,
                                  radius=120.)

        GEUtil.AddDownloadable("models\\weapons\\ammocrate.mdl")

        self.EndRound = False
        self.EndMatch = True