Пример #1
0
        public override cForce copy( )
        {
            cForceGravity f = new cForceGravity();

            f.copy(this);
            return(f);
        }
Пример #2
0
        /* 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;
        }
Пример #3
0
        /* 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;
        }