internal pSprite(pTexture texture, FieldTypes field, OriginTypes origin, ClockTypes clocking, Vector2 position, float depth, bool alwaysDraw, Color4 colour) { Field = field; Origin = origin; Clocking = clocking; Position = position; Colour = colour; Scale = Vector2.One; Rotation = 0; DrawDepth = depth; AlwaysDraw = alwaysDraw; if (!alwaysDraw) { Alpha = 0; } else { Alpha = 1; } Texture = texture; UsesTextures = true; }
internal pSprite(Texture2D texture, FieldTypes fieldType, OriginTypes originType, ClockTypes clockType, Vector2 startPosition, float drawDepth, bool alwaysDraw, Color colour, Object tag) { Type = SpriteTypes.Image; localTexture = texture; Disposable = false; SpriteEffect = SpriteEffects.None; OriginType = originType; UpdateTextureSize(); UpdateTextureAlignment(); Clock = clockType; CurrentPosition = startPosition; StartPosition = CurrentPosition; CurrentRotation = 0; CurrentScale = 1; Depth = drawDepth; AlwaysDraw = alwaysDraw; Field = fieldType; CurrentColour = colour; StartColour = colour; Tag = tag; }
public void setClock(ClockTypes type) { clockObjects[(int)previous].Hide(); clockObjects[(int)type].Top = clockObjects[(int)previous].Top; clockObjects[(int)type].Left = clockObjects[(int)previous].Left; clockObjects[(int)type].Show(); previous = type; }
/// <summary> /// Gets the current time for a specific clock type. /// </summary> /// <param name="clock">The clock type in question.</param> /// <returns>The current time.</returns> public static int GetTime(ClockTypes clock) { switch (clock) { case ClockTypes.AudioInputAdjusted: return(AudioTimeInputAdjust); case ClockTypes.Audio: return(AudioTime); default: case ClockTypes.Game: return(Time); case ClockTypes.Mode: return(ModeTime); case ClockTypes.Manual: return(ManualTime); } }
internal pAnimation(Texture2D[] textures, FieldTypes fieldType, OriginTypes originType, ClockTypes clockType, Vector2 startPosition, float drawDepth, bool alwaysDraw, Color colour, object tag) : base(textures[0], fieldType, originType, clockType, startPosition, drawDepth, alwaysDraw, colour, tag) { TextureArray = textures; TextureCount = textures.Length; }
internal pAnimation(Texture2D[] textures, FieldTypes fieldType, OriginTypes originType, ClockTypes clockType, Vector2 startPosition, float drawDepth, bool alwaysDraw, Color colour) : this(textures, fieldType, originType, clockType, startPosition, drawDepth, alwaysDraw, colour, null) { }
private void FillClockTypeSelectList(ClockTypes? selected = null) { ViewBag.Types = selected.TranslatedSelectList(); }
internal pSpriteText(string text, string fontname, int spacingOverlap, FieldTypes fieldType, OriginTypes originType, ClockTypes clockType, Vector2 startPosition, float drawDepth, bool alwaysDraw, Color colour) : base(null, fieldType, originType, clockType, startPosition, drawDepth, alwaysDraw, colour) { Text = text; localTexture = null; textChanged = true; Type = SpriteTypes.SpriteText; TextFont = fontname; SpacingOverlap = spacingOverlap; }
internal pSpriteRenderer(pTexture texture, FieldTypes field, OriginTypes origin, ClockTypes clocking, Vector2 position, float depth, bool alwaysDraw, Color4 colour) : base(texture, field, origin, clocking, position, depth, alwaysDraw, colour) { }
internal pSprite(string pngFilename, FieldTypes fieldType, OriginTypes originType, ClockTypes clockType, Vector2 startPosition, float drawDepth, bool alwaysDraw, Color colour, Object tag) : this(SpriteCache.GetTexture(pngFilename), fieldType, originType, clockType, startPosition, drawDepth, alwaysDraw, colour, tag) { }
internal pSprite(Texture2D texture, FieldTypes fieldType, OriginTypes originType, ClockTypes clockType, Vector2 position) : this(texture, fieldType, originType, clockType, position, 1, false, Color.White) { }
internal pSprite(Texture2D texture, FieldTypes fieldType, OriginTypes originType, ClockTypes clockType, int startX, int startY) : this(texture, fieldType, originType, clockType, new Vector2(startX, startY), 1, false, Color.White) { }