示例#1
0
        public override void GamePlayHasStarted()
        {
            //OwnerPlayer.IsAllUnknownContactsHostile = true; //now set in GameScenarioPlayer
            OwnerPlayer.IsAutomaticallyRespondingToActiveSensor = true;
            OwnerPlayer.IsAutomaticallyEvadingAttacks           = true;
            OwnerPlayer.DefaultWeaponOrders = GameConstants.WeaponOrders.FireOnAllClearedTargets;
            if (string.IsNullOrEmpty(OwnerPlayer.Name) || OwnerPlayer.Name == OwnerPlayer.Id)
            {
                OwnerPlayer.Name = "Computer AI";
            }
            //foreach (var player in OwnerPlayer.Enemies)
            //{
            //    if (!player.IsComputerPlayer)
            //    {
            //        OwnerPlayer.CreateNewMessage(player, "gl hf");
            //    }
            //}
            SetPrioritizedTargets();
            HighLevelOrder hlo = new HighLevelOrder(
                GameConstants.HighLevelOrderType.TurnOffUnnecessaryActiveSensors, 600, 600, 9999);

            OwnerPlayer.HighLevelOrders.Enqueue(hlo);
            if (OwnerPlayer.IsAutomaticallySettingHighValueDefence)
            {
                DefendHighValueUnits();
            }

            SetWeaponAndSensorOrders();

            base.GamePlayHasStarted();
        }
示例#2
0
 public void SetupHighOrder(HighLevelOrder highLevelOrder)
 {
     this.HighLevelOrder = highLevelOrder;
 }