Example #1
0
        SCNNode CreateMonkeyPalmTree()
        {
            SCNNode palmTreeProtoObject = null;

            string palmTreeDae = "art.scnassets/characters/monkey/monkey_palm_tree.dae";

            palmTreeProtoObject = GameSimulation.LoadNodeWithName("PalmTree", palmTreeDae);

            SCNNode monkeyNode = GameSimulation.LoadNodeWithName(string.Empty, "art.scnassets/characters/monkey/monkey_skinned.dae");

            var monkey = new MonkeyCharacter(monkeyNode);

            monkey.CreateAnimations();
            palmTreeProtoObject.AddChildNode(monkey);

            return(palmTreeProtoObject);
        }
Example #2
0
        void AddMonkeyAtPosition(SCNVector3 worldPos, nfloat rotation)
        {
            if (Monkeys == null)
            {
                Monkeys = new List <MonkeyCharacter> ();
            }

            SCNNode palmTree = CreateMonkeyPalmTree();

            palmTree.Position = worldPos;
            palmTree.Rotation = new SCNVector4(0f, 1f, 0f, rotation);
            RootNode.AddChildNode(palmTree);

            MonkeyCharacter monkey = (MonkeyCharacter)palmTree.FindChildNode("monkey", true);

            if (monkey != null)
            {
                Monkeys.Add(monkey);
            }
        }
Example #3
0
		SCNNode CreateMonkeyPalmTree ()
		{
			SCNNode palmTreeProtoObject = null;

			string palmTreeDae = "art.scnassets/characters/monkey/monkey_palm_tree.dae";
			palmTreeProtoObject = GameSimulation.LoadNodeWithName ("PalmTree", palmTreeDae);

			SCNNode monkeyNode = GameSimulation.LoadNodeWithName (string.Empty, "art.scnassets/characters/monkey/monkey_skinned.dae");

			var monkey = new MonkeyCharacter (monkeyNode);
			monkey.CreateAnimations ();
			palmTreeProtoObject.AddChildNode (monkey);

			return palmTreeProtoObject;
		}