Example #1
0
        protected override void OnBegin()
        {
            base.OnBegin();
            CopiedMotion = Motion.CopyTo(gameObject);

            CopiedMotion.Initialize(Target, Delta);
        }
Example #2
0
        public override void SetupGenerated(Projectile generated)
        {
            base.SetupGenerated(generated);

            if (MotionOverride != null)
            {
                var oldMotion = generated.Motion;
                generated.Motion = MotionOverride.CopyTo(generated.gameObject);

                if (oldMotion != null)
                {
                    Destroy(oldMotion);
                }
            }

            generated.Setup(Delta);
        }