public class ArmourPowerupEntity : ModelledEntity {
private const float DEFAULT_ARMOUR_SCALING = 1f;
public ArmourPowerupEntity(Vector3 powerupPosition)
: this(powerupPosition, DEFAULT_ARMOUR_SCALING) { }
public ArmourPowerupEntity(Vector3 powerupPosition, float customScaling) {
Model = ModelDatabase.ArmourModel;
Position = powerupPosition;
Scaling = customScaling;
}
}
public class RocketProjectileEntity : ModelledEntity {
public RocketProjectileEntity(Vector3 firingPoint, Vector3 firingVelocity, bool isBigRocket) {
Model = ModelDatabase.RocketModel;
Position = firingPoint;
Velocity = firingVelocity;
Scaling = isBigRocket ? 2f : 1f;
}
}
Code snippet taken from "Simulating Multiple Inheritance In C#".