本文整理汇总了C#中FlatRedBall类的典型用法代码示例。如果您正苦于以下问题:C# FlatRedBall类的具体用法?C# FlatRedBall怎么用?C# FlatRedBall使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FlatRedBall类属于命名空间,在下文中一共展示了FlatRedBall类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FromAxisAlignedCube
public static AxisAlignedCubeSave FromAxisAlignedCube(FlatRedBall.Math.Geometry.AxisAlignedCube cube)
{
AxisAlignedCubeSave aacs = new AxisAlignedCubeSave();
aacs.X = cube.X;
aacs.Y = cube.Y;
aacs.Z = cube.Z;
aacs.ScaleX = cube.ScaleX;
aacs.ScaleY = cube.ScaleY;
aacs.ScaleZ = cube.ScaleZ;
aacs.Name = cube.Name;
if (cube.Parent != null)
{
aacs.Parent = cube.Parent.Name;
}
aacs.Alpha = cube.Color.A / 255.0f;
aacs.Red = cube.Color.R / 255.0f;
aacs.Green = cube.Color.G / 255.0f;
aacs.Blue = cube.Color.B / 255.0f;
return aacs;
}
示例2: LoadEmittersClick
public static void LoadEmittersClick(FlatRedBall.Gui.Window callingWindow)
{
FileWindow tempWindow = GuiManager.AddFileWindow();
tempWindow.Filter = "XML Emitter (*.emix)|*.emix";
tempWindow.CurrentFileType = "emix";
tempWindow.OkClick += new GuiMessage(LoadEmitterOK);
}
示例3: LoadEmitterOK
public static void LoadEmitterOK(FlatRedBall.Gui.Window callingWindow)
{
string fileName = ((FileWindow)callingWindow).Results[0];
AppCommands.Self.File.LoadEmitters(fileName);
}
示例4: AddToManagers
public virtual void AddToManagers (FlatRedBall.Graphics.Layer layerToAddTo)
{
LayerProvidedByContainer = layerToAddTo;
FlatRedBall.SpriteManager.AddPositionedObject(this);
AddToManagersBottomUp(layerToAddTo);
CustomInitialize();
}
示例5: OnSoundEffectCheckBoxClick
void OnSoundEffectCheckBoxClick(FlatRedBall.Gui.IWindow callingWindow)
{
if(this.SoundEffectCheckBox.CurrentState == CheckBox.VariableState.Checked)
{
}
}
示例6: FromAxisAlignedRectangle
// This class does not support visibility.
// The reason is because setting visibility
// on a AxisAlignedRectangle (which would occur
// in the ToAxisAlignedRectangle method) would add
// it to the manager. We can't do that because the ToRuntime
// methods should not add the object to any manager. Maybe we'll
// fix this at some point in the future.
//public bool Visible;
//public bool ShouldSerializeVisible()
//{
// return Visible == false;
//}
#endregion
public static AxisAlignedRectangleSave FromAxisAlignedRectangle(FlatRedBall.Math.Geometry.AxisAlignedRectangle rectangle)
{
AxisAlignedRectangleSave aars = new AxisAlignedRectangleSave();
aars.SetFrom(rectangle);
return aars;
}
示例7: FromCircle
public static CircleSave FromCircle(FlatRedBall.Math.Geometry.Circle circle)
{
CircleSave circleSave = new CircleSave();
circleSave.SetFrom(circle);
return circleSave;
}
示例8: FromPolygon
public static PolygonSave FromPolygon(FlatRedBall.Math.Geometry.Polygon polygon)
{
PolygonSave polygonSave = new PolygonSave();
int pointCount = polygon.Points.Count;
polygonSave.Points = new Point[pointCount];
for (int i = 0; i < polygon.Points.Count; i++)
{
polygonSave.Points[i] = polygon.Points[i];
}
polygonSave.Name = polygon.Name;
polygonSave.X = polygon.Position.X;
polygonSave.Y = polygon.Position.Y;
polygonSave.Z = polygon.Position.Z;
polygonSave.RotationZ = polygon.RotationZ;
polygonSave.Alpha = polygon.Color.A / 255.0f;
polygonSave.Red = polygon.Color.R / 255.0f;
polygonSave.Green = polygon.Color.G / 255.0f;
polygonSave.Blue = polygon.Color.B / 255.0f;
return polygonSave;
}
示例9: OnNextQuestionClickTunnel
void OnNextQuestionClickTunnel(FlatRedBall.Gui.IWindow callingWindow)
{
if (this.NextQuestionClick != null)
{
NextQuestionClick(callingWindow);
}
}
示例10: emitAllClick
private void emitAllClick(FlatRedBall.Gui.Window callingWindow)
{
foreach (Emitter emitter in EditorData.Emitters)
{
emitter.Emit();
}
}
示例11: emitCurrentClick
private void emitCurrentClick(FlatRedBall.Gui.Window callingWindow)
{
if (AppState.Self.CurrentEmitter != null)
{
AppState.Self.CurrentEmitter.Emit(null);
}
}
示例12: OnXboxAButtonRollOn
void OnXboxAButtonRollOn(FlatRedBall.Gui.IWindow callingWindow)
{
if (canRollOver)
{
AButtonInst.RotationZ = 1;
}
}
示例13: ReAddToManagers
// Generated AddToManagers
public virtual void ReAddToManagers (FlatRedBall.Graphics.Layer layerToAddTo)
{
LayerProvidedByContainer = layerToAddTo;
FlatRedBall.SpriteManager.AddPositionedObject(this);
FlatRedBall.SpriteManager.AddToLayer(Sprite, LayerProvidedByContainer);
FlatRedBall.Math.Geometry.ShapeManager.AddToLayer(Cuerpo, LayerProvidedByContainer);
}
示例14: AddToManagers
public override void AddToManagers (FlatRedBall.Graphics.Layer layerToAddTo)
{
LayerProvidedByContainer = layerToAddTo;
FlatRedBall.SpriteManager.AddToLayer(Sprite, LayerProvidedByContainer);
FlatRedBall.Math.Geometry.ShapeManager.AddToLayer(Cuerpo, LayerProvidedByContainer);
base.AddToManagers(layerToAddTo);
CustomInitialize();
}
示例15: IsGue
public static bool IsGue(FlatRedBall.Glue.SaveClasses.NamedObjectSave item)
{
return item.SourceType == FlatRedBall.Glue.SaveClasses.SourceType.File &&
!string.IsNullOrEmpty(item.SourceFile) &&
!string.IsNullOrEmpty(item.SourceName) &&
(FileManager.GetExtension(item.SourceFile) == "gusx" || FileManager.GetExtension(item.SourceFile) == "gucx");
}