/* Constructors */
 public GraphicsObject(ILevel component_owner, PhysicalObject parent)
     : base(component_owner, 0.0f)
 {
     mParent = parent;
     mColour = Color.White;
     mRenderColour = Color.White;
     mScale = Vector2.One;
     mBlendState = BlendState.AlphaBlend;
     mSamplerState = SamplerState.AnisotropicClamp;
 }
        // Constructors
        public Animation(ILevel component_owner, PhysicalObject parent, string texture_name, float animation_timer)
            : base(component_owner, parent, texture_name)
        {
            // Retrieve the animation bounds
            Rectangle frame = Rectangle.Empty;
            component_owner.Game.Content.GetTexture(texture_name, out mAnimationBounds, out frame);
            Source = frame;

            // Setup the animation alarm
            mFrameAlarmMax = animation_timer;
        }
 /* Constructors */
 public PhysicsEffect(PhysicalObject parent)
     : base(parent, 0.0f)
 {
     mRestitution = 1.0f;
     mPower = 0.0f;
     mFriction = 0.0f;
     mForce = Vector2.Zero;
     mMass = 1.0f;
     mAngularForce = 0.0f;
     mAngularVelocity = 0.0f;
     mAngularMass = 1.0f;
 }
 public Animation(ILevel component_owner, PhysicalObject parent, string texture_name, float animation_timer, Rectangle frame)
     : base(component_owner, parent, texture_name)
 {
     mFrameAlarmMax = animation_timer;
     mAnimationBounds = frame;
 }
Example #5
0
 /* Constructors */
 public Rotator(PhysicalObject parent, float rotation)
     : base(parent, 0.0f)
 {
     mRotation = rotation;
 }
Example #6
0
 /* Constructors */
 public Sprite(ILevel component_owner, PhysicalObject parent, string texture_name)
     : base(component_owner, parent)
 {
     mTexture = component_owner.Game.Content.GetTexture(texture_name, out mSource);
     Centre = new Vector2(mSource.Width, mSource.Height) * 0.5f;
 }
 public void MoveToward(PhysicalObject target, float multiplier)
 {
     MoveToward(target.Position, multiplier);
 }
 /* Events */
 public void MoveToward(PhysicalObject target)
 {
     MoveToward(target.Position);
 }
Example #9
0
 // Utilities
 void ApplyGravity(PhysicalObject obj)
 {
     throw new NotImplementedException();
 }