Example #1
0
 public ScaleToAction(MyGame theGame, Transform transform, Vector2 target, int playAmount)
     : base(theGame, playAmount)
 {
     m_transform  = transform;
     m_startScale = m_transform.Scale;
     m_target     = target;
 }
Example #2
0
 public MoveToDynamicAction(MyGame theGame, Transform transform, Transform target, int playAmount)
     : base(theGame, playAmount)
 {
     m_transform = transform;
     m_startPos  = m_transform.Position;
     m_target    = target;
 }
Example #3
0
 public DurationAction(MyGame theGame, int amountOfPlays)
     : base()
 {
     m_theGame       = theGame;
     m_timer         = new PTimer(m_theGame.TimerManager, Loop);
     m_amountOfPlays = m_initialAmountOfPlays = amountOfPlays;
 }
Example #4
0
 public RotateToStaticAction(MyGame theGame, Transform transform, float target, int playAmount)
     : base(theGame, playAmount)
 {
     m_transform      = transform;
     m_startRot       = (float)m_transform.Direction;
     m_rotationTarget = target;
 }
 public ParticleGenerator(MyGame theGame, ParticleSystem system)
     : base()
 {
     m_theGame         = theGame;
     m_system          = system;
     m_generationTimer = m_generationInterval;
 }
Example #6
0
 public FloatPointerAnimation(MyGame theGame, FloatContainer valueToAnimate, float targetValue, int playAmount)
     : base(theGame, playAmount)
 {
     m_startValue     = valueToAnimate.Value;
     m_endValue       = targetValue;
     m_valueToAnimate = valueToAnimate;
 }
Example #7
0
 public Vector2PointerAnimation(MyGame theGame, Vector2Container valueToAnimate, Vector2 targetValue, int playAmount)
     : base(theGame, playAmount)
 {
     m_startValue     = valueToAnimate.Value;
     m_endValue       = targetValue;
     m_valueToAnimate = valueToAnimate;
 }
 public ParticleGenerator(MyGame theGame, ParticleSystem system, object[] autoArgs)
     : base()
 {
     m_theGame         = theGame;
     m_system          = system;
     m_generationTimer = m_generationInterval;
     m_autoArgs        = autoArgs;
 }
Example #9
0
 public Sprite(MyGame theGame, SpriteSheet spriteSheet, Transform transform)
 {
     m_theGame        = theGame;
     SpriteSheet      = spriteSheet;
     m_transform      = transform;
     m_srcRect.Width  = m_spriteSheet.FrameWidth;
     m_srcRect.Height = m_spriteSheet.FrameHeight;
     Origin           = new Vector2(0.5f, 0.5f);
 }
 public PhysicsComponent(PhysicsComponent objectToCopy, Transform transform)
 {
     m_myGame = objectToCopy.m_myGame;
     m_transform = transform;
     Mass = objectToCopy.Mass;
     Friction = objectToCopy.Friction;
     Restitution = objectToCopy.Restitution;
     AirFriction = objectToCopy.AirFriction;
 }
 public PhysicsComponent(MyGame theGame, Transform transform)
 {
     m_myGame = theGame;
     m_transform = transform;
     Mass = 1;
     Friction = 1;
     Restitution = 1;
     AirFriction = 1;
 }
Example #12
0
 public Sprite(MyGame theGame, SpriteSheet spriteSheet, Transform transform)
 {
     m_theGame = theGame;
     SpriteSheet = spriteSheet;
     m_transform = transform;
     m_srcRect.Width = m_spriteSheet.FrameWidth;
     m_srcRect.Height = m_spriteSheet.FrameHeight;
     Origin = new Vector2(0.5f, 0.5f);
 }
Example #13
0
 public Sprite(Sprite spriteToCopy, Transform transform)
 {
     m_theGame      = spriteToCopy.m_theGame;
     m_srcRect      = spriteToCopy.m_srcRect;
     m_spriteSheet  = spriteToCopy.m_spriteSheet;
     m_origin       = spriteToCopy.m_origin;
     m_renderOrigin = spriteToCopy.m_renderOrigin;
     m_colour       = spriteToCopy.m_colour;
     m_renderColour = spriteToCopy.m_renderColour;
     m_transform    = transform;
 }
Example #14
0
        public Actor(MyGame theGame)
        {
            m_theGame = theGame;

            //Sets the entity's ID to a unique ID.
            _ID = currentID;
            ++currentID;
            m_parent = null;

            m_transform = new Transform();
        }
Example #15
0
        public Actor(MyGame theGame)
        {
            m_theGame = theGame;

            //Sets the entity's ID to a unique ID.
            _ID = currentID;
            ++currentID;
            m_parent = null;

            m_transform = new Transform();
        }
Example #16
0
 public Sprite(Sprite spriteToCopy, Transform transform)
 {
     m_theGame = spriteToCopy.m_theGame;
     m_srcRect = spriteToCopy.m_srcRect;
     m_spriteSheet = spriteToCopy.m_spriteSheet;
     m_origin = spriteToCopy.m_origin;
     m_renderOrigin = spriteToCopy.m_renderOrigin;
     m_colour = spriteToCopy.m_colour;
     m_renderColour = spriteToCopy.m_renderColour;
     m_transform = transform;
 }
Example #17
0
 public DelayAction(MyGame theGame, float delayTime)
     : base(theGame, 1)
 {
     Timer.Interval = delayTime;
 }
 public StandardParticle(MyGame theGame, Sprite sprite)
 {
     m_theGame = theGame;
     m_sprite  = sprite;
 }
 public ParticleSystem(MyGame theGame, int maxParticles)
 {
     m_theGame   = theGame;
     m_particles = new IParticle[maxParticles];
 }
 public MoveToStaticAction(MyGame theGame, Transform transform, Vector2 target, int playAmount)
     : base(theGame, playAmount)
 {
     m_transform = transform;
     m_startPos = m_transform.Position;
     m_target = target;
 }
 public FloatPointerAnimation(MyGame theGame, FloatContainer valueToAnimate, float targetValue, int playAmount)
     : base(theGame, playAmount)
 {
     m_startValue = valueToAnimate.Value;
     m_endValue = targetValue;
     m_valueToAnimate = valueToAnimate;
 }
 public DelayAction(MyGame theGame, float delayTime)
     : base(theGame, 1)
 {
     Timer.Interval = delayTime;
 }
Example #23
0
 public ActiveList(MyGame theGame, float updateTickInSeconds)
 {
     m_theGame        = theGame;
     m_timer          = new PTimer(theGame.TimerManager, OnUpdate);
     m_timer.Interval = updateTickInSeconds;
 }
 public ActiveList(MyGame theGame, float updateTickInSeconds)
 {
     m_theGame = theGame;
     m_timer = new PTimer(theGame.TimerManager, OnUpdate);
     m_timer.Interval = updateTickInSeconds;
 }
 public PhysicsParticle(MyGame theGame, SpriteSheet spriteSheet, PhysicsParticleData data)
 {
     m_sprite = new Sprite(theGame, spriteSheet, new Transform());
     m_theGame = theGame;
     m_transform = m_sprite.Transform;
     m_physics = new PhysicsComponent(m_theGame, m_sprite.Transform);
     m_data = data;
 }
 public RotateToStaticAction(MyGame theGame, Transform transform, float target, int playAmount)
     : base(theGame, playAmount)
 {
     m_transform = transform;
     m_startRot = (float)m_transform.Direction;
     m_rotationTarget = target;
 }
 public SpriteDrawingList(MyGame theGame, float updateTickInSeconds) : base(theGame, updateTickInSeconds)
 {
 }
 public ScaleToAction(MyGame theGame, Transform transform, Vector2 target, int playAmount)
     : base(theGame, playAmount)
 {
     m_transform = transform;
     m_startScale = m_transform.Scale;
     m_target = target;
 }
 public Vector2PointerAnimation(MyGame theGame, Vector2Container valueToAnimate, Vector2 targetValue, int playAmount)
     : base(theGame, playAmount)
 {
     m_startValue = valueToAnimate.Value;
     m_endValue = targetValue;
     m_valueToAnimate = valueToAnimate;
 }
 public GameboyDrawer(MyGame game)
 {
     m_theGame = game;
     m_drawingRectangle = new Rectangle(0, 0, game.ScreenWidth, game.ScreenHeight);
     m_renderTarget = new RenderTarget2D(m_theGame.GraphicsDevice, 160, 144);
 }
 public DurationAction(MyGame theGame, int amountOfPlays)
     : base()
 {
     m_theGame = theGame;
     m_timer = new PTimer(m_theGame.TimerManager, Loop);
     m_amountOfPlays = m_initialAmountOfPlays = amountOfPlays;
 }
 public PhysicsParticle(Sprite sprite, PhysicsParticleData data)
 {
     //_burntTexture = TextureManager.GetBurnt(textureName);
     //BindParent(parent);
     m_sprite = sprite;
     m_theGame = m_sprite.TheGame;
     m_transform = sprite.Transform;
     m_physics = new PhysicsComponent(m_theGame, sprite.Transform);
     m_data = data;
 }
Example #33
0
 public MoveToTransform(MyGame theGame, Transform transform, Transform start, Transform end, int playAmount)
     : base(theGame, playAmount)
 {
     m_transform = transform;
     m_start = start;
     m_end = end;
 }
 public SpriteDrawingList(MyGame theGame, float updateTickInSeconds)
     : base(theGame, updateTickInSeconds)
 {
 }