Ekspoint Posted September 16, 2015 Share Posted September 16, 2015 В какой функции можно использовать нажатие клавишь что бы работали только в ангаре? 1 1 @ Quote Link to comment Short link Share on other sites More sharing options...
KoHcoJlb Posted September 16, 2015 Share Posted September 16, 2015 (edited) if (messenger.MessengerEntry.g_instance.gui._GUIDecorator__currentScope == 2): ... Я так проверяю, не знаю насколько это правильно но пока нареканий нет. Edited September 16, 2015 by Console 1 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted September 16, 2015 Author Share Posted September 16, 2015 if (messenger.MessengerEntry.g_instance.gui._GUIDecorator__currentScope == 2): ...Я так проверяю, не знаю насколько это правильно но пока нареканий нет. и что это? 1 1 @ Quote Link to comment Short link Share on other sites More sharing options...
KoHcoJlb Posted September 16, 2015 Share Posted September 16, 2015 Это проверка находиться ли игрок в ангаре. old_handleKeyEvent = game.handleKeyEvent def new_handleKeyEvent(event): if gui_instance._GUIDecorator__currentScope == 2: ... return old_handleKeyEvent(event) game.handleKeyEvent = new_handleKeyEvent 1 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted September 17, 2015 Author Share Posted September 17, 2015 Это проверка находиться ли игрок в ангаре. old_handleKeyEvent = game.handleKeyEvent def new_handleKeyEvent(event): if gui_instance._GUIDecorator__currentScope == 2: ... return old_handleKeyEvent(event) game.handleKeyEvent = new_handleKeyEvent спс, глянуА для боя как? 1 1 @ Quote Link to comment Short link Share on other sites More sharing options...
KoHcoJlb Posted September 17, 2015 Share Posted September 17, 2015 Для боя 3 вроде. @ Quote Link to comment Short link Share on other sites More sharing options...
Ekspoint Posted September 17, 2015 Author Share Posted September 17, 2015 Для боя 3 вроде. я уже нашел, спс @ Quote Link to comment Short link Share on other sites More sharing options...
GPCracker Posted September 21, 2015 Share Posted September 21, 2015 if (messenger.MessengerEntry.g_instance.gui._GUIDecorator__currentScope == 2): ... И зачем такие танцы, еще и с приватными атрибутами? Не проще сделать import BigWorld from Avatar import PlayerAvatar from Account import PlayerAccount if isinstance(BigWorld.player(), PlayerAvatar): #Battle if isinstance(BigWorld.player(), PlayerAccount): #Hangar А вообще самый четкий вариант все сделать так, чтобы экземпляр класса мода создавался при инициализации нужного класса, и убивался при его деструкции. 1 @ Quote Link to comment Short link Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.