[r3]: / trunk / RetroGames / Pong / GameObjects / FB_Board / svnobj  Maximize  Restore  History

Download this file

18 lines (17 with data), 3.8 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
udiTimeNow := SysTimeGetMs();
udiTimeDiff := udiTimeNow - udiTimeOld;
// The vector is stored in pixel per millisecond
IF (udiTimeDiff <> 0) THEN
/// on the movement of the object. The new position should be calculated by
/// the derived class.
FUNCTION_BLOCK FB_Board EXTENDS FB_ObjectBase
VAR_INPUT
END_VAR
VAR_OUTPUT
VAR
VAR_TEMP
	udiTimeNow : UDINT;
	udiTimeDiff : UDINT;
VAR CONSTANT
	iWidth : INT := 20;
	iHeight : INT := 100;