This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
2,051 additions
and
1,867 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,51 @@ | ||
{ | ||
"usualy_play":"common", | ||
"play":{ | ||
"common":{ | ||
"path":["resources","I"], | ||
"turns":{ | ||
"front":"F (", | ||
"first":"1", | ||
"last":"121", | ||
"end":").png", | ||
"fps": 60 | ||
} | ||
} | ||
"Setting": { | ||
"ImageSize": [ | ||
711, | ||
496 | ||
], | ||
"Change": 0.5, | ||
"usualy_play": "common" | ||
}, | ||
"play": { | ||
"surprise": { | ||
"path": [ | ||
"resources", | ||
"I" | ||
], | ||
"turns": { | ||
"front": "F (", | ||
"end": ").png", | ||
"first": 1, | ||
"last": 121, | ||
"fps": 60 | ||
} | ||
}, | ||
"common": { | ||
"path": [ | ||
"resources", | ||
"R" | ||
], | ||
"turns": { | ||
"front": "F (", | ||
"end": ").png", | ||
"first": 1, | ||
"last": 121, | ||
"fps": 60 | ||
} | ||
} | ||
} | ||
}, | ||
"OnClick": { | ||
"Use_xy": false, | ||
"Action": [ | ||
"SpeakAndPlay" | ||
] | ||
}, | ||
"ActionGroup": { | ||
"SpeakAndPlay": { | ||
"play": [ | ||
"surprise" | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
from .imports import * | ||
class Find(QtCore.QThread): | ||
play = pyqtSignal(str) | ||
|
||
def __init__(self, Script): | ||
super().__init__() | ||
self.Script = Script | ||
self.ActionGroup = None | ||
|
||
def Find(self,Action): | ||
try: | ||
self.ActionGroup = self.Script["ActionGroup"] | ||
if Action in self.ActionGroup: # 检查动作是否在动作组 | ||
Actions = self.ActionGroup[Action] | ||
for From in Actions: # 遍历动作组,获得相应定义的动作 类 | ||
if From == 'play': | ||
for runs in Actions[From]: # 遍历动作 类 ,获得类中动作 | ||
print('PlayAction',runs) | ||
self.play.emit(runs) | ||
|
||
return True | ||
|
||
except: | ||
if Action in self.Script["play"]: # 检查动作是否在play组 | ||
self.play.emit(Action) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.