1 Star 0 Fork 0

Junruoyu-Zheng/programming-battle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
entity.py 316 Bytes
一键复制 编辑 原始数据 按行查看 历史
from component import Component
class Entity:
def __init__(self) -> None:
self.components:list[Component] = []
def get_component(self, type:type) -> Component:
for component in self.components:
if isinstance(component, type):
return component
return None
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/junruoyu-zheng/programming-battle.git
git@gitee.com:junruoyu-zheng/programming-battle.git
junruoyu-zheng
programming-battle
programming-battle
master

搜索帮助