public override cForce copy( ) { cForceGravity f = new cForceGravity(); f.copy(this); return(f); }
/* 25.0 seems to work well as a default value. * Since I often use this in 2D games, we'll make the default gravity be negative Y reather than * the negative Z we'd normally want for 3D games. */ public override void copy(cForce pforce) { base.copy(pforce); if (!(pforce is cForceGravity)) { return; } cForceGravity pforcechild = ( cForceGravity )(pforce); _pulldirection = pforcechild._pulldirection; }
/* 25.0 seems to work well as a default value. * Since I often use this in 2D games, we'll make the default gravity be negative Y reather than * the negative Z we'd normally want for 3D games. */ public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("cForceGravity")) { return; } cForceGravity pforcechild = ( cForceGravity )(pforce); _pulldirection = pforcechild._pulldirection; }