rendered paste body/**
* (c) jph-dev.net 2007
*/
package engine
{
import flash.events.Event;
/**
* Cam Class
* Kamera Klasse der Engine.
*
* @author Jean-Pascal Hövel <contact@jph-dev.net>
*/
public class Cam
{
/*******************************************************************************
PRIVATE-VARS
********************************************************************************/
/**
* Speichert die Kamera
* Koordinaten.
*
*/
private static var point:Object = {x:0, y:0, z:0};
/**
* Speichert die Ziel-Kamera
* Koordinaten.
*
*/
private static var target:Object = {x:0, y:0, z:0};
/*******************************************************************************
PUBLIC-GETTER
********************************************************************************/
public static function get x():Number
{
return point.x;
}
public static function get y():Number
{
return point.y;
}
public static function get z():Number
{
return point.z;
}
/*******************************************************************************
PUBLIC-SETTER
********************************************************************************/
public static function set x(x:Number):void
{
target.x = x;
}
public static function set y(y:Number):void
{
target.y = y;
}
public static function set z(z:Number):void
{
target.z = z;
}
/*******************************************************************************
EVENT-HANDLER
********************************************************************************/
public static function update(event:Event):void
{
target.z += 20;
point.x = (target.x - point.x) / 10;
point.y = (target.y - point.y) / 10;
point.z = (target.z - point.z) / 30;
}
}
}