static void Main(string[] args) { Knight knight = new Knight(); Mage mage = new Mage(); EnterGame(mage); }
static void Main(string[] args) { Knight knight = new Knight(); Mage mage = new Mage(); knight.Move(); mage.Move(); }
static void EnterGame(Player player) { player.Move(); Mage mage = (player as Mage); if (mage != null) { mage.mp = 10; } }
static void EnterGame(Player player) { Mage mage = (player as Mage); if (mage != null) { mage.mp = 10; mage.Move(); } Knight knight = (player as Knight); if (mage != null) { knight.Move(); } }