다음을 통해 공유


SCNGeometry.AddAnimation 메서드

정의

오버로드

AddAnimation(CAAnimation, NSString)

지정된 키로 인덱싱된 지정된 애니메이션을 추가합니다.

AddAnimation(SCNAnimationPlayer, NSString)

AddAnimation(CAAnimation, NSString)

지정된 키로 인덱싱된 지정된 애니메이션을 추가합니다.

[Foundation.Export("addAnimation:forKey:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 3, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void AddAnimation (CoreAnimation.CAAnimation animation, Foundation.NSString key);
[Foundation.Export("addAnimation:forKey:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 3, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Unavailable(ObjCRuntime.PlatformName.WatchOS, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 8, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void AddAnimation (CoreAnimation.CAAnimation animation, Foundation.NSString key);
abstract member AddAnimation : CoreAnimation.CAAnimation * Foundation.NSString -> unit
override this.AddAnimation : CoreAnimation.CAAnimation * Foundation.NSString -> unit

매개 변수

animation
CAAnimation
key
NSString

구현

특성

설명

다음 예제에서는 회전 애니메이션을 개체에 추가할 수 있는 SCNGeometry 방법을 보여줍니다.

var animation = new CABasicAnimation();
animation.KeyPath = "rotation";
var v = new SCNVector4 (1.0F, 1.0F, 0.0F, (float) (Math.PI * 2.0));
animation.To = NSValue.FromVector (v);
animation.Duration = 5.0f;
animation.RepeatCount = float.MaxValue; //repeat forever
boxNode.AddAnimation(animation,new NSString("rotation"));

적용 대상

AddAnimation(SCNAnimationPlayer, NSString)

[Foundation.Export("addAnimationPlayer:forKey:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 13, ObjCRuntime.PlatformArchitecture.Arch64, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 3, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void AddAnimation (SceneKit.SCNAnimationPlayer player, Foundation.NSString key);
[Foundation.Export("addAnimationPlayer:forKey:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 13, ObjCRuntime.PlatformArchitecture.Arch64, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 3, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 8, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 8, ObjCRuntime.PlatformArchitecture.All, null)]
public virtual void AddAnimation (SceneKit.SCNAnimationPlayer player, Foundation.NSString key);
abstract member AddAnimation : SceneKit.SCNAnimationPlayer * Foundation.NSString -> unit
override this.AddAnimation : SceneKit.SCNAnimationPlayer * Foundation.NSString -> unit

매개 변수

key
NSString
특성

적용 대상