本文整理汇总了Python中core.Character.__subclasses__方法的典型用法代码示例。如果您正苦于以下问题:Python Character.__subclasses__方法的具体用法?Python Character.__subclasses__怎么用?Python Character.__subclasses__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类core.Character
的用法示例。
在下文中一共展示了Character.__subclasses__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: rchop
# 需要导入模块: from core import Character [as 别名]
# 或者: from core.Character import __subclasses__ [as 别名]
from os import path, makedirs, listdir, chdir, system
from operator import itemgetter
from core import Character, rpgbs_init
from all_characters import *
def rchop(thestring, ending):
if thestring.endswith(ending):
return thestring[: -len(ending)]
return thestring
app_lib = path.dirname(path.realpath(__file__))
characters = [Character()]
for character in Character.__subclasses__():
eval("characters.append(" + character.__name__ + "())")
subclasses = character.__subclasses__()
for subclass in subclasses:
eval("characters.append(" + subclass.__name__ + "())")
character_names = []
for character in characters:
character_names.append(character.name)
# moves = sorted(get_attacks().items())
markdown_doc = {
"documentation": path.join(app_lib, "documentation"),
"characters": path.join(app_lib, "documentation", "md", "characters"),
"attacks": path.join(app_lib, "documentation", "md", "moves"),
"elements": path.join(app_lib, "documentation", "md", "elements"),