Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 2
0
        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;
        }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
        /// <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);
            }
        }
Ejemplo n.º 5
0
 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;
 }
Ejemplo n.º 6
0
 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)
 {
 }
Ejemplo n.º 7
0
 private void FillClockTypeSelectList(ClockTypes? selected = null)
 {
     ViewBag.Types = selected.TranslatedSelectList();
 }
Ejemplo n.º 8
0
 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;
 }
Ejemplo n.º 9
0
 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)
 {
 }
Ejemplo n.º 10
0
 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)
 {
 }
Ejemplo n.º 11
0
 internal pSprite(Texture2D texture, FieldTypes fieldType, OriginTypes originType, ClockTypes clockType,
                  Vector2 position)
     : this(texture, fieldType, originType, clockType, position, 1, false, Color.White)
 {
 }
Ejemplo n.º 12
0
 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)
 {
 }