public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("CenteringForce")) { return; } CenteringForce pforcechild = (CenteringForce)pforce; //copy fields here }
public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("cForceMinionMovement")) { return; } cForceMinionMovement pforcechild = (cForceMinionMovement)pforce; moveTowards = pforcechild.moveTowards; }
public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("cForceGravity")) { return; } cForceObjectSpringRod pforcechild = ( cForceObjectSpringRod )(pforce); _rodlength = pforcechild._rodlength; }
public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("cForceDrag")) { return; } cForceDrag pforcechild = (cForceDrag)pforce; // Cast so as to access fields. _windvector = pforcechild._windvector; }
public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("cForceObject")) { return; } cForceObject pForceObject = ( cForceObject )(pforce); _pnode = pForceObject._pnode; //Want a shallow copy }
public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("cForceClassEvade")) { return; } cForceClassEvade pforcechild = ( cForceClassEvade )(pforce); _dartspeedup = pforcechild._dartspeedup; }
/* 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; }
public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("cForceBossMovement")) { return; } cForceBossMovement pforcechild = (cForceBossMovement)(pforce); speed = pforcechild.speed; }
/* protected constructors to make this like an abstract class you don't use * instances of. */ public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("cForceClass")) { return; } cForceClass pforcechild = ( cForceClass )(pforce); _pnodeclass = pforcechild._pnodeclass; _includechildclasses = pforcechild._includechildclasses; }
public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("cForceVortex")) { return; } cForceVortex pforcechild = ( cForceVortex )(pforce); // Cast so next lines work. _eyeposition.copy(pforcechild._eyeposition); _spiralangle = pforcechild._spiralangle; }
public override void copy(cForce pforce) { base.copy(pforce); if (!pforce.IsKindOf("KnockbackForce")) { return; } KnockbackForce pforcechild = (KnockbackForce)pforce; //copy fields here forceVector.copy(pforcechild.forceVector); count = pforcechild.count; }