私の問題は、プレイ可能なキャラクターの属性を継承することにあります。Beingという名前の抽象クラスがあり、継承するすべてのクラスに、Strength、Dexterityなどの属性が含まれている必要があります。プレイヤーは種族を選択する必要があります。たとえば、Strengthを0から10に上げるOrcを選択する必要があります。ヒーローの強さにさらに7ポイントを追加するブルートなどのクラス。私が見る限り、2つの抽象クラスを継承するヒーロークラスで立ち往生するでしょうか?これは私のOrcクラスの抜粋です:
public abstract class Orc:Being
{
private int _strength = 10;
//Another question, is it okay to declare an abstract property in my base abstract
//class to force the inheriting class Orc to override the property? I wanted to
//find a way to force subclasses to have strength attributes
public override int Strength
{
get {return _strength;}
set {_strength = value;}
}
}