Example #1
0
 public void PlayVoice(EscortDeckModel deck)
 {
     if (deck.GetFlagShip() != null)
     {
         ShipUtils.PlayShipVoice(deck.GetFlagShip(), 2);
     }
 }
Example #2
0
 private void InitializeEscortDeckIcons(EscortDeckModel escortDeckModel)
 {
     for (int i = 0; i < DeployShips.Length; i++)
     {
         if (i < escortDeckModel.Count)
         {
             DeployShips[i].Initialize(escortDeckModel.GetShip(i));
         }
         else
         {
             DeployShips[i].InitializeDefailt();
         }
     }
 }
Example #3
0
        public void Init(bool isGoeiChange)
        {
            this.mIsEndPhase = false;
            if (this.keyController == null)
            {
                this.keyController = new KeyControl(0, 2, 0.4f, 0.1f);
            }
            SingletonMonoBehaviour <Live2DModel> .Instance.Enable();

            this.SetLandscape();
            this.TankerNum.text = this.top.TankerCount.ToString();
            this.deployMaterials.updateMaterials(this.top.areaID, this.top.TankerCount, EscortOrganizeTaskManager.GetEscortManager());
            KeyControlManager.Instance.KeyController = this.keyController;
            EscortDeckModel editDeck = EscortOrganizeTaskManager.GetEscortManager().EditDeck;

            this.InitializeEscortDeckIcons(editDeck);
            StrategyTopTaskManager.Instance.UIModel.OverCamera.SetActive(true);
            this.top.isChangeMode = false;
            this.btnManager.setFocus(0);
            if (isGoeiChange)
            {
                this.keyController.IsRun = false;
                this.ChangeCharactertoEscortFlagShip();
            }
            this.DelayAction(0.3f, delegate
            {
                if (this.EscortOrganize == null)
                {
                    GameObject gameObject = Util.Instantiate(StrategyTopTaskManager.GetCommandMenu().EscortOrganize, base.get_transform().get_parent().get_gameObject(), false, false);
                    gameObject.SetActive(false);
                    gameObject.get_transform().localPositionX(9999f);
                    this.EscortOrganize = gameObject;
                }
                bool flag = StrategyTopTaskManager.GetLogicManager().IsValidDeploy(StrategyTopTaskManager.Instance.TileManager.FocusTile.areaID, this.top.TankerCount, EscortOrganizeTaskManager.GetEscortManager());
                if (flag)
                {
                    this.btnLight.PlayAnim();
                }
                else
                {
                    this.btnLight.StopAnim();
                }
            });
        }
        public void UpdateEscortDeck(EscortDeckModel deck)
        {
            bool flag = Banner.ShipModel == null || Banner.ShipModel != deck.GetFlagShip();

            Banner.SetShipData(deck.GetFlagShip());
            for (int i = 0; i < shipTypeIcons.Length; i++)
            {
                ShipModel ship = deck.GetShip(i + 1);
                if (ship != null)
                {
                    shipTypeIcons[i].spriteName = ShipTypeIconName[ship.ShipType];
                    ChangeColor(ship, shipTypeIcons[i]);
                }
                else
                {
                    shipTypeIcons[i].spriteName = string.Empty;
                }
            }
            if (flag)
            {
                updateView(0.2f);
            }
        }