Beispiel #1
0
        protected override void OnCopyDataTo(object targetObj, ICloneOperation operation)
        {
            base.OnCopyDataTo(targetObj, operation);
            VelocityTracker target = targetObj as VelocityTracker;

            target.lastPosition  = this.lastPosition;
            target.lastAngle     = this.lastAngle;
            target.posDiff       = this.posDiff;
            target.angleDiff     = this.angleDiff;
            target.velocity      = this.velocity;
            target.angleVelocity = this.angleVelocity;
        }
Beispiel #2
0
        private void ResetAngleVelocity()
        {
            if (this.gameobj == null)
            {
                return;
            }
            VelocityTracker tracker = this.gameobj.GetComponent <VelocityTracker>();

            if (tracker != null)
            {
                tracker.ResetAngleVelocity(this.angleAbs);
            }
        }