예제 #1
0
        public override void SetupSlide(PresentationViewController presentationViewController)
        {
            // Using a scene source allows us to retrieve the animations using their identifier
            var path        = NSBundle.MainBundle.PathForResource("Scenes/skinning/skinning", "dae");
            var sceneURL    = NSUrl.FromFilename(path);
            var sceneSource = SCNSceneSource.FromUrl(sceneURL, (NSDictionary)null);

            // Place the character in the scene
            var error = new NSError();
            var scene = sceneSource.SceneWithOption((SCNSceneLoadingOptions)null, out error);

            CharacterNode          = scene.RootNode.FindChildNode("avatar_attach", true);
            CharacterNode.Scale    = new SCNVector3(0.004f, 0.004f, 0.004f);
            CharacterNode.Position = new SCNVector3(5, 0, 12);
            CharacterNode.Rotation = new SCNVector4(0, 1, 0, -(float)(Math.PI / 8));
            CharacterNode.Hidden   = true;
            GroundNode.AddChildNode(CharacterNode);

            SkeletonNode = CharacterNode.FindChildNode("skeleton", true);

            // Prepare the other resources
            //TODO LoadGhostEffect ();
            ExtractAnimation(sceneSource);
        }