本文整理汇总了C#中Urho.Node.ScaleNode方法的典型用法代码示例。如果您正苦于以下问题:C# Node.ScaleNode方法的具体用法?C# Node.ScaleNode怎么用?C# Node.ScaleNode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Urho.Node
的用法示例。
在下文中一共展示了Node.ScaleNode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
protected override void Start()
{
base.Start();
EnableGestureManipulation = true;
Zone.AmbientColor = new Color(0.8f, 0.8f, 0.8f);
DirectionalLight.Brightness = 1;
mutantNode = Scene.CreateChild();
mutantNode.Position = new Vector3(0, 0, 2f);
mutantNode.SetScale(0.2f);
var mutant = mutantNode.CreateComponent<AnimatedModel>();
mutant.Model = ResourceCache.GetModel("Models/Mutant.mdl");
mutant.SetMaterial(ResourceCache.GetMaterial("Materials/mutant_M.xml"));
animation = mutantNode.CreateComponent<AnimationController>();
PlayAnimation(IdleAni);
RegisterCortanaCommands(new Dictionary<string, Action>
{
//play animations using Cortana
{"idle", () => PlayAnimation(IdleAni)},
{"die", () => PlayAnimation(KillAni)},
{"dance", () => PlayAnimation(HipHopAni)},
{"jump", () => PlayAnimation(JumpAni)},
{"jump attack", () => PlayAnimation(JumpAttack)},
{"kick", () => PlayAnimation(KickAni)},
{"punch", () => PlayAnimation(PunchAni)},
{"run", () => PlayAnimation(RunAni)},
{"swipe", () => PlayAnimation(SwipeAni)},
{"walk", () => PlayAnimation(WalkAni)},
{"bigger", () => mutantNode.ScaleNode(1.2f)},
{"smaller", () => mutantNode.ScaleNode(0.8f)},
{"increase the brightness", () => IncreaseBrightness(1.2f)},
{"decrease the brightness", () => IncreaseBrightness(0.8f)},
{"look at me", LookAtMe },
{"turn around", () => mutantNode.RunActions(new RotateBy(1f, 0, 180, 0))},
{"help", Help }
});
}