public override void Create() { MoveSpeed = new FloatValue("Move Speed", 10); ResizeSpeed = new FloatValue("Resize Speed", 10); base.Create(); AddTag(GameObjectTag.Update); AddTag(GameObjectTag._2DForward); FormChildren = ParentScene.GetList(GameObjectTag.Form); }
public void DrawShadows() { Game1.graphicsDevice.BlendState = BlendState.Opaque; Game1.graphicsDevice.DepthStencilState = DepthStencilState.Default; Transfer.LightPosition = Position.get(); Transfer.LightDistance = Scale.get() / 2; for (int i = 0; i < 6; i++) { CubeMapFace CurrentFace = (CubeMapFace)(i); Game1.graphicsDevice.SetRenderTarget(ShadowCube.Value, CurrentFace); Game1.graphicsDevice.Clear(Color.White); foreach (GameObject g in ParentScene.GetList(GameObjectTag._3DShadow)) { g.Draw3D(ShadowCameras[i], GameObjectTag._3DShadow); } } Game1.graphicsDevice.SetRenderTarget(null); }