本文整理汇总了C#中Actor.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Actor.Add方法的具体用法?C# Actor.Add怎么用?C# Actor.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Actor
的用法示例。
在下文中一共展示了Actor.Add方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Main
static int Main(string[] args)
{
DynamicsSystem.SetGravity(0.0f, -9.81f, 0.0f);
GraphicsWindow wnd = new GraphicsWindow("Test Window", 640, 480);
/* Create an actor at the origin to contain the camera */
Actor camera = new Actor();
camera.Add(wnd.Camera);
wnd.Camera.BackgroundColor = System.Drawing.Color.SkyBlue;
wnd.Camera.Position.Z = 3.0;
/* Create an actor to hold a box */
Actor box = new Actor();
box.Add(new BoxShape(1.0f, 1.0f, 1.0f));
box.Add(new RigidBody());
_scene.Add(camera);
_scene.Add(box);
/* Enable visualization of collision shapes */
Visualization.Add("FlatFour.Collision.BoxVisualizer");
/* Run the event loop */
PlatformSystem.Tick += new TickHandler(OnTick);
PlatformSystem.EventLoop();
Framework.Disconnect();
return 0;
}
示例2: SetsPoseShortcut
public void SetsPoseShortcut()
{
Actor a = new Actor();
Pose p = new Pose();
a.Add(p);
Assert.AreSame(p, a.Pose);
}
示例3: SetsPoseShutcutFromSubclass
public void SetsPoseShutcutFromSubclass()
{
Actor a = new Actor();
MyPose p = new MyPose();
a.Add(p);
Assert.AreSame(p, a.Pose);
}
示例4: SetsActorRef
public void SetsActorRef()
{
Actor a = new Actor();
MyBehavior b = new MyBehavior();
a.Add(b);
Assert.AreSame(a, b.Actor);
}