Skip to content

Commit 8096b2e

Browse files
author
Lionel
committed
initial
0 parents  commit 8096b2e

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

main.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import cocos
2+
3+
class HelloWorld(cocos.layer.Layer):
4+
def __init__(self):
5+
super( HelloWorld, self ).__init__()
6+
7+
label = cocos.text.Label('Hello, World!',
8+
font_name='Times New Roman',
9+
font_size=32,
10+
anchor_x='center', anchor_y='center')
11+
12+
label.position = 320,240
13+
self.add( label )
14+
15+
if __name__ == "__main__":
16+
cocos.director.director.init()
17+
hello_layer = HelloWorld ()
18+
main_scene = cocos.scene.Scene (hello_layer)
19+
cocos.director.director.run (main_scene)

ressources/img/blue_tile.png

190 Bytes
Loading

0 commit comments

Comments
 (0)