File: water-wave_controller.cfg

package info (click to toggle)
frogatto-data 1.2%2Bdfsg-1
  • links: PTS, VCS
  • area: non-free
  • in suites: wheezy
  • size: 201,844 kB
  • sloc: python: 302; xml: 223; perl: 139; sh: 48; makefile: 13; ruby: 4
file content (108 lines) | stat: -rw-r--r-- 2,067 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
[object_type]
always_active="yes"
id="water-wave_controller"
ignore_collide="true"
on_create="[set(alpha,0), set(zorder, -20), add_particles('bubbles'),
				set(old_zone_y1, zone_y1)]"
on_end_anim="animation('normal')"
on_process="[	set(old_zone_y1, new_zone_y1),
		set(new_zone_y1, zone_y1+(wave(cycle*3))/2),
		if(level.player.x > zone_x1 and level.player.x < zone_x2 and level.player.y > new_zone_y1 and level.player.y < zone_y2,
			[set (level.player.velocity_y, (level.player.velocity_y + (wave((cycle+86.6)*3)  /7.5)))]),
			#                                               offset^   ^speed ^ratio		#
		remove_water(zone_x1, old_zone_y1, zone_x2, zone_y2),
		add_water(zone_x1, new_zone_y1, zone_x2, zone_y2)
	]"
zorder="100"
	[editor_info]
	category="controllers"
		[var]
		name="zone_x1"
		type="x"
		value="x"
		[/var]

		[var]
		name="zone_x2"
		type="x"
		value="x+200"
		[/var]

		[var]
		name="zone_y1"
		type="y"
		value="y"
		[/var]

		[var]
		name="zone_y2"
		type="y"
		value="y+200"
		[/var]

		[var]
		name="wave_height"
		value="10"
		[/var]

		[var]
		name="wave_strength"
		value="15"
		[/var]

	[/editor_info]

	[consts]
	[/consts]

	[animation]
	duration="1000"
	frame_info="0,0,2,1,997,368,26,27"
	frames="1"
	id="normal"
	image="compiled-2.png"
	rect="997,368,1024,395"
	[/animation]

	[particle_system]
	color="120,250,200,200"
	dot_size="4"
	id="bubbles"
	number_of_particles="100"
	repeat_period="200"
	type="water"
	velocity_rand="4"
	velocity_x="0"
	velocity_y="-1"
	[/particle_system]

	[particle_system]
	accel_y="-10"
	delta_a="2"
	id="fizz"
	max_x="260"
	max_y="15"
	min_x="-60"
	min_y="-15"
	spawn_rate="600"
	time_to_live="300"
	type="simple"
	velocity_x="260"
	velocity_x_random="200"
	velocity_y="-200"
	velocity_y_random="400"
		[animation]
		duration="8"
		frame_info="1,1,1,1,631,18,5,5,2,2,2,2,636,18,3,3,3,3,2,2,639,18,2,2,3,3,3,3,641,18,1,1,3,3,3,3,642,18,1,1"
		frames="5"
		frames_per_row="5"
		id="sparkle"
		image="compiled-0.png"
		rect="630,17,636,23"
		scale="2"
		[/animation]

	[/particle_system]

[/object_type]