<s> from __future__ import division , print_function , unicode_literals <EOL> import sys <EOL> import os <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT:..>' ) ) <EOL> testinfo = "<STR_LIT>" <EOL> tags = "<STR_LIT>" <EOL> import cocos <EOL> from cocos . director import director <EOL> import cocos . actions as ac <EOL> from cocos . layer import * <EOL> description = """<STR_LIT>""" <EOL> def get_test_scene ( ) : <EOL> template_action = ac . Repeat ( <EOL> ac . Delay ( <NUM_LIT:1.0> ) <EOL> + <EOL> ac . Rotate ( <NUM_LIT> , <NUM_LIT> ) <EOL> + <EOL> ac . Delay ( <NUM_LIT:1.0> ) <EOL> + <EOL> ac . ScaleTo ( <NUM_LIT> , <NUM_LIT:1.0> ) <EOL> + <EOL> ac . ScaleTo ( <NUM_LIT:1.0> , <NUM_LIT:1.0> ) <EOL> ) <EOL> w , h = director . get_window_size ( ) <EOL> world = cocos . layer . Layer ( ) <EOL> bluish_square = cocos . layer . ColorLayer ( <NUM_LIT:0> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:255> , width = <NUM_LIT:100> , height = <NUM_LIT:100> ) <EOL> bluish_square . transform_anchor = ( bluish_square . width / <NUM_LIT> , bluish_square . height / <NUM_LIT> ) <EOL> bluish_square . position = ( w // <NUM_LIT:3> , h // <NUM_LIT:2> ) <EOL> bluish_square . do ( template_action ) <EOL> world . add ( bluish_square , z = <NUM_LIT:2> ) <EOL> mark_anchor = cocos . layer . ColorLayer ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:255> , width = <NUM_LIT:8> , height = <NUM_LIT:8> ) <EOL> mark_anchor . position = ( bluish_square . x + bluish_square . transform_anchor_x , <EOL> bluish_square . y + bluish_square . transform_anchor_y ) <EOL> world . add ( mark_anchor , z = <NUM_LIT:3> ) <EOL> redish_square = cocos . layer . ColorLayer ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT:0> , <NUM_LIT:255> , width = <NUM_LIT:100> , height = <NUM_LIT:100> ) <EOL> redish_square . transform_anchor = ( <NUM_LIT:0> , <NUM_LIT:0> ) <EOL> redish_square . position = ( w * <NUM_LIT:2> // <NUM_LIT:3> , h // <NUM_LIT:2> ) <EOL> redish_square . do ( template_action ) <EOL> world . add ( redish_square , z = <NUM_LIT:2> ) <EOL> mark_anchor = cocos . layer . ColorLayer ( <NUM_LIT> , <NUM_LIT> , <NUM_LIT> , <NUM_LIT:255> , width = <NUM_LIT:8> , height = <NUM_LIT:8> ) <EOL> mark_anchor . position = ( redish_square . x + redish_square . transform_anchor_x , <EOL> redish_square . y + redish_square . transform_anchor_y ) <EOL> world . add ( mark_anchor , z = <NUM_LIT:3> ) <EOL> scene = cocos . scene . Scene ( ) <EOL> scene . add ( world ) <EOL> return scene <EOL> def main ( ) : <EOL> print ( description ) <EOL> director . init ( resizable = True ) <EOL> scene = get_test_scene ( ) <EOL> director . run ( scene ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
