File: back_defence.lua

package info (click to toggle)
blobby 1.1.1%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,944 kB
  • sloc: cpp: 22,442; xml: 779; python: 56; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 420 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
__AUTHOR__ = "chameleon"
__TITLE__  = "Crazy Volley - Back Defence"
function HandleInput(player, left, right, up)
	if isgamerunning() and touches(player) == 0 and posx(player) > CONST_FIELD_WIDTH / 4 and posx(player) < CONST_FIELD_WIDTH * 3 / 4 then
		if launched(player) then
			if player == LEFT_PLAYER then
				right = false
			else
				left = false
			end
		else
			up = false
		end
	end
	return left, right, up
end