コード例 #1
0
ファイル: DelayedMotion.cs プロジェクト: KLD/UnityUtility
        public override Motion CopyTo(GameObject go)
        {
            DelayedMotion copy = go.AddComponent <DelayedMotion>();

            copy.WrappedMotion = WrappedMotion;
            copy.Delay         = Delay;
            copy.LookAt        = LookAt.Copy();
            return(copy);
        }
コード例 #2
0
        public override Motion CopyTo(GameObject go)
        {
            TargetedMotion copy = go.AddComponent <TargetedMotion>();

            copy.Target            = Target.Copy();
            copy.Degree            = Degree;
            copy.Speed             = Speed;
            copy.Invert            = Invert;
            copy.HideGizmo         = HideGizmo;
            copy.Sender            = Sender;
            copy.DegreeToTarget    = DegreeToTarget;
            copy.DegreeStepLength  = DegreeStepLength;
            copy.DegreeStepSize    = DegreeStepSize;
            copy.StepCounter       = StepCounter;
            copy.AlternativeMotion = AlternativeMotion == null? null : AlternativeMotion.CopyTo(go);

            return(copy);
        }