namespace TACO { using System; using System.Collections; public abstract class Thingie : Part { private double mX = 0; private double mY = 0; private double mVelocityX = 0; private double mVelocityY = 0; private double mWeightFactor = 1; private double mWeightTolerance = 0; private ArrayList mSlots = new ArrayList(); public Thingie(string id) : base(id) { } public double X { get { return mX; } set { mX = value; } } public double Y { get { return mY; } set { mY = value; } } public virtual double VelocityX { get { return mVelocityX; } set { mVelocityX = value; } } public virtual double VelocityY { get { return mVelocityY; } set { mVelocityY = value; } } public virtual bool Movable { get { return true; } } public bool Moving { get { return VelocityX != 0.0 || VelocityY != 0.0; } } public bool Falling { get { return VelocityY > 0.0; } } public abstract double NaturalWeight { get; } public double WeightFactor { get { return mWeightFactor; } set { mWeightFactor = value; } } public double WeightTolerance { get { return mWeightTolerance; } set { mWeightTolerance = value; } } public virtual bool SizableX { get { return false; } } public virtual bool SizableY { get { return false; } } public ArrayList Slots { get { return mSlots; } } } }