初始化
This commit is contained in:
1 parent
dffebce01d
commit
ff618906d3
2501 files changed
+1181005
-21
No files matched your search
@@ -0,0 +1,40 @@
|
||||
# coding=utf-8
|
||||
from ...BlueFoxTools.SystemTools import SystemTools
|
||||
from ...BlueFoxTools.SpecialFunciton.BlueFoxSystem import BlueFoxClientSystem
|
||||
from ...BlueFoxTools.ToolsConfig import *
|
||||
from ...BlueFoxTools.EventFilter import BlueFoxFilterEnum as ef
|
||||
from ...Function import blockIndex
|
||||
|
||||
|
||||
class MainClient(BlueFoxClientSystem):
|
||||
systemTools = SystemTools.GetTools('MainClient')
|
||||
mcListener = systemTools.ListenForEvent()
|
||||
blueFox = systemTools.GetBlueFoxServerListener()
|
||||
mainServer = systemTools.ListenForEvent(
|
||||
namespace=MOD_NAME, systemName='MainServer'
|
||||
)
|
||||
blockUse = systemTools.FilterListener('ClientBlockUseEvent')
|
||||
|
||||
def __init__(self, *args):
|
||||
super(MainClient, self).__init__(*args)
|
||||
self.systemTools.Binding(self)
|
||||
|
||||
@blueFox
|
||||
def PlaySound(self, args):
|
||||
posDim = args['posDim']
|
||||
pitch = args['pitch']
|
||||
if posDim[3] == clientCompFactory.CreateGame(LevelId).GetCurrentDimension():
|
||||
clientCompFactory.CreateCustomAudio(LevelId).PlayCustomMusic(
|
||||
args['soundName'], posDim[:3], pitch=pitch
|
||||
)
|
||||
|
||||
# @blockUse(ef.ClientEvent.NormalEvent.NotInCd('rtdd:blockUse', 0.2))
|
||||
# def BlockUseNotIn02(self, args):
|
||||
# print args
|
||||
# blockName = args['blockName']
|
||||
# if blockName in blockName:
|
||||
# args['cancel'] = True
|
||||
|
||||
@blueFox
|
||||
def PlayAttackAnim(self, args):
|
||||
clientCompFactory.CreatePlayer(LevelId).Swing()
|
||||
Reference in new issue
Block a user