コード例 #1
0
        private void Start()
        {
            CrusaderArmy crusaderArmy = new CrusaderArmy();
            DoctorArmy   doctorArmy   = new DoctorArmy();
            ArmedArmy    armedArmy    = new ArmedArmy();

            Player player = new Player();

            List <ICommand> commands = new List <ICommand>();

            commands.Add(new AttackCommand(armedArmy));
            commands.Add(new PushCommand(crusaderArmy));
            commands.Add(new HealCommand(doctorArmy));

            player.SetCommand(new MacroCommand(commands));
            player.WarButton();
        }
コード例 #2
0
ファイル: HealCommand.cs プロジェクト: MrEk0/RPG
 public HealCommand(DoctorArmy doctor)
 {
     doctorArmy = doctor;
 }