python - pycharm cannot find reference 'layer' in '__init__.py' for cocos2d -
i starting out learn cocos2d
using python.
when write in pycharm :
import cocos class helloworld(cocos.layer.layer): def __init__(self): super(helloworld, self).__init__() label = cocos.text.label('hello, world!', font_name = 'times new roman', font_size = 32, anchor_x='center', anchor_y='center') label.position = 320, 240 self.add(label) cocos.director.director.init() hello_layer = helloworld() main_scene = cocos.scene.scene(hello_layer) cocos.director.director.run(main_scene)
pycharm shows error cannot find reference 'layer' in '__init__.py'
when run it, code works. code works when run inside pycharm (not via terminal), although don't find surprising, thought maybe requires mentioning. doesn't gives auto-suggestions and/or auto-completes related cocos2d
.
any idea on how fix ?
i using python 3.4.
Comments
Post a Comment