File: water-wave_controller.cfg

package info (click to toggle)
frogatto-data 1.3.1%2Bdfsg-4
  • links: PTS, VCS
  • area: non-free
  • in suites: forky, sid, trixie
  • size: 254,428 kB
  • sloc: xml: 584; python: 396; perl: 249; sh: 126; ruby: 69; makefile: 21
file content (120 lines) | stat: -rw-r--r-- 2,546 bytes parent folder | download | duplicates (3)
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
109
110
111
112
113
114
115
116
117
118
119
120
{
id: "water-wave_controller",
ignore_collide: true,
always_active: true,
hidden_in_game: true,
zorder: 100,
consts: {
},

#end_height = -2465
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)
	]",

#on_editor_changing_variable="remove_water(zone_x1, old_zone_y1, zone_x2, zone_y2)"
#on_editor_removed="remove_water(zone_x1, old_zone_y1, zone_x2, zone_y2)"
#on_editor_changed_variable="add_water(zone_x1, new_zone_y1, zone_x2, zone_y2)"
#on_editor_added="add_water(zone_x1, new_zone_y1, zone_x2, zone_y2)"
on_create: "[set(zorder, -20), add_particles('bubbles'),
				set(old_zone_y1, zone_y1)]",

#on_done_create="[
#set(bubbles.area, [zone_x1, zone_y1, zone_x2, zone_y2]),
#set(fizz.min_x, vars.zone_x1 - x),
#set(fizz.max_x, vars.zone_x2 - x),
#set(fizz.min_y, (vars.zone_y1 - 15) - y),
#set(fizz.max_y, (vars.zone_y1 + 15) - y),
#set(fizz.spawn_rate, 2*(zone_x2 - zone_x1))
#]"
on_end_anim: "animation('normal')",
editor_info: {
	category: "controllers",
	var: [
		{
			name: "zone_x1",
			type: "x",
			value: "x",
		},
		{
			name: "zone_x2",
			type: "x",
			value: "x+200",
		},
		{
			name: "zone_y1",
			type: "y",
			value: "y",
		},
		{
			name: "zone_y2",
			type: "y",
			value: "y+200",
		},
		{
			name: "wave_height",
			value: 10,
		},
		{
			name: "wave_strength",
			value: 15,
		},
	],
},
animation: {
	id: "normal",
	image: "effects/particles.png",
	x: 210,
	y: 197,
	w: 28,
	h: 28,
	frames: 1,
	duration: 1000,
},
particle_system: [
	{
		id: "bubbles",
		type: "water",
		number_of_particles: 100,
		repeat_period: 200,
		velocity_y: -1,
		velocity_x: 0,
		velocity_rand: 4,
		dot_size: 4,
		color: [120,250,200,200],
	},
	{
		id: "fizz",
		type: "simple",
		spawn_rate: 600,
		time_to_live: 300,
		min_x: -60,
		max_x: 260,
		min_y: -15,
		max_y: 15,
		velocity_y: -200,
		velocity_x: 260,
		velocity_x_random: 200,
		velocity_y_random: 400,
		accel_y: -10,

		#color=255,255,255,255
		delta_a: 2,
		animation: {
			id: "sparkle",
			image: "effects/particles.png",
			rect: [3,93,9,99],
			pad: 3,
			frames: 5,
			frames_per_row: 5,
			scale: 2,
			duration: 8,
		},
	},
],
}