Exemplo n.º 1
0
        private void SetText(enumMapEventType iEventType, enumMapWarType iWarType)
        {
            string text = string.Empty;

            if (iEventType == enumMapEventType.Stupid && iWarType == enumMapWarType.Midnight)
            {
                text = "艦隊針路\n選択可能!";
            }
            _uiText.text = text;
        }
 public Map_ResultFmt()
 {
     this.Rashin_id  = CompassType.None;
     this.Cell_no    = 0;
     this.Color_no   = 0;
     this.Event_id   = enumMapEventType.None;
     this.Event_kind = enumMapWarType.None;
     this.IsNext     = false;
     this.Comment    = MapCommentKind.None;
     this.Production = MapProductionKind.None;
     this.GetSpoint  = 0;
 }
Exemplo n.º 3
0
 public Map_ResultFmt()
 {
     Rashin_id  = CompassType.None;
     Cell_no    = 0;
     Color_no   = 0;
     Event_id   = enumMapEventType.None;
     Event_kind = enumMapWarType.None;
     IsNext     = false;
     Comment    = MapCommentKind.None;
     Production = MapProductionKind.None;
     GetSpoint  = 0;
 }
Exemplo n.º 4
0
        public void PlayBalloon(enumMapEventType iEventType, enumMapWarType iWarType, Action onFinished)
        {
            ProdBalloon balloon = ProdBalloon.Instantiate(((Component)_prefabProdBalloon).GetComponent <ProdBalloon>(), base.transform, _iDirection, iEventType, iWarType);

            balloon.depth = _uiShipSprite.depth + 1;
            balloon.ShowHide().setOnComplete((Action) delegate
            {
                Dlg.Call(ref onFinished);
                UnityEngine.Object.Destroy(balloon.gameObject);
                Mem.Del(ref balloon);
            });
        }
Exemplo n.º 5
0
 public override void __Init__(Api_req_SortieBattle reqBattle, enumMapWarType warType, BattleFormationKinds1 formationId, MapModel map, List <MapModel> maps, bool lastCell, bool isBoss)
 {
     base.__Init__(reqBattle, warType, formationId, map, maps, lastCell, isBoss);
     if (warType == enumMapWarType.Normal || warType == enumMapWarType.AirBattle)
     {
         DebugBattleMaker.SerializeDayBattle(this._battleData);
     }
     else if (warType == enumMapWarType.Midnight)
     {
         DebugBattleMaker.SerializeNightBattle(this._battleData);
     }
     else if (warType == enumMapWarType.Night_To_Day)
     {
         DebugBattleMaker.SerializeNightBattle(this._battleData);
     }
 }
Exemplo n.º 6
0
        private KCV.Battle.Utils.TimeZone GetStartTimeZone(enumMapWarType iType)
        {
            switch (iType)
            {
            case enumMapWarType.Normal:
            case enumMapWarType.AirBattle:
                return(KCV.Battle.Utils.TimeZone.DayTime);

            case enumMapWarType.Midnight:
            case enumMapWarType.Night_To_Day:
                return(KCV.Battle.Utils.TimeZone.Night);

            default:
                return(KCV.Battle.Utils.TimeZone.None);
            }
        }
Exemplo n.º 7
0
        public static BattlePhase GetStarBattleFleetAdventNextPhase(enumMapWarType iType)
        {
            BattlePhase result = BattlePhase.BattlePhase_BEF;

            switch (iType)
            {
            case enumMapWarType.Normal:
                result = BattlePhase.Detection;
                break;

            case enumMapWarType.Midnight:
            case enumMapWarType.Night_To_Day:
                result = BattlePhase.NightCombat;
                break;
            }
            return(result);
        }
Exemplo n.º 8
0
        public override void __Init__(Api_req_SortieBattle reqBattle, enumMapWarType warType, BattleFormationKinds1 formationId, MapModel map, List <MapModel> maps, bool lastCell, bool isBoss)
        {
            base.__Init__(reqBattle, warType, formationId, map, maps, lastCell, isBoss);
            switch (warType)
            {
            case enumMapWarType.Normal:
            case enumMapWarType.AirBattle:
                DebugBattleMaker.SerializeDayBattle(_battleData);
                break;

            case enumMapWarType.Midnight:
                DebugBattleMaker.SerializeNightBattle(_battleData);
                break;

            case enumMapWarType.Night_To_Day:
                DebugBattleMaker.SerializeNightBattle(_battleData);
                break;
            }
        }
Exemplo n.º 9
0
        private IEnumerator PlayStupid(UniRx.IObserver <bool> observer, enumMapWarType iWarType)
        {
            UIMapManager   uimm         = SortieMapTaskManager.GetUIMapManager();
            UIAreaMapFrame uiamf        = SortieMapTaskManager.GetUIAreaMapFrame();
            UIMapManager   uiMapManager = SortieMapTaskManager.GetUIMapManager();

            uimm.nextCell.PlayRipple(Color.red);
            uiMapManager.nextCell.SetPassedDefaultColor();
            yield return(SortieMapTaskManager.GetUIMapManager().sortieShip.PlayExclamationPoint().StartAsCoroutine());

            uiamf.SetMessage(enumMapEventType.Stupid, iWarType);
            yield return(new WaitForSeconds(1f));

            uimm.nextCell.StopRipple();
            uiMapManager.UpdateCellState(uiMapManager.nextCell.cellModel.CellNo, isPassed: true);
            uiamf.ClearMessage();
            observer.OnNext(value: true);
            observer.OnCompleted();
        }
Exemplo n.º 10
0
 public void SetMember(CompassType rashin_id, Mst_mapcell2 target_cell, MapItemGetFmt item, List <MapItemGetFmt> clearItems, MapHappningFmt happning, MapCommentKind comment, MapProductionKind production, AirReconnaissanceFmt airSearch, EventMapInfo eventMap, List <int> selectcell, List <int> newOpenMap, int spoint)
 {
     Rashin_id = rashin_id;
     Cell_no   = target_cell.No;
     if (selectcell != null)
     {
         SelectCells = selectcell.ToList();
     }
     Color_no          = target_cell.Color_no;
     Event_id          = target_cell.Event_1;
     Event_kind        = target_cell.Event_2;
     IsNext            = target_cell.IsNext();
     Comment           = comment;
     Production        = production;
     AirReconnaissance = airSearch;
     ItemGet           = item;
     MapClearItem      = clearItems;
     Happning          = happning;
     MapHp             = eventMap;
     NewOpenMapId      = newOpenMap;
     GetSpoint         = spoint;
 }
 public void SetMember(CompassType rashin_id, Mst_mapcell2 target_cell, MapItemGetFmt item, List <MapItemGetFmt> clearItems, MapHappningFmt happning, MapCommentKind comment, MapProductionKind production, AirReconnaissanceFmt airSearch, EventMapInfo eventMap, List <int> selectcell, List <int> newOpenMap, int spoint)
 {
     this.Rashin_id = rashin_id;
     this.Cell_no   = target_cell.No;
     if (selectcell != null)
     {
         this.SelectCells = Enumerable.ToList <int>(selectcell);
     }
     this.Color_no          = target_cell.Color_no;
     this.Event_id          = target_cell.Event_1;
     this.Event_kind        = target_cell.Event_2;
     this.IsNext            = target_cell.IsNext();
     this.Comment           = comment;
     this.Production        = production;
     this.AirReconnaissance = airSearch;
     this.ItemGet           = item;
     this.MapClearItem      = clearItems;
     this.Happning          = happning;
     this.MapHp             = eventMap;
     this.NewOpenMapId      = newOpenMap;
     this.GetSpoint         = spoint;
 }
Exemplo n.º 12
0
        public virtual void __Init__(Api_req_SortieBattle reqBattle, enumMapWarType warType, BattleFormationKinds1 formationId, MapModel map, List <MapModel> maps, bool lastCell, bool isBoss)
        {
            this._recovery_item_use_count_at_start = Comm_UserDatas.Instance.User_trophy.Use_recovery_item_count;
            this._enemy_deck_id = -1;
            this._reqBattle     = reqBattle;
            this._war_type      = warType;
            this._is_boss       = isBoss;
            this._last_cell     = lastCell;
            this._map           = map;
            this._maps          = maps;
            BattleHeader header = null;

            if (warType == enumMapWarType.Normal || warType == enumMapWarType.AirBattle)
            {
                this._battleData = this._reqBattle.GetDayPreBattleInfo(formationId).data;
                this._phase      = CombatPhase.DAY;
                header           = this._battleData.DayBattle.Header;
            }
            else if (warType == enumMapWarType.Midnight)
            {
                this._battleData = this._reqBattle.Night_Sp(formationId).data;
                this._phase      = CombatPhase.NIGHT;
                header           = this._battleData.NightBattle.Header;
            }
            else if (warType != enumMapWarType.Night_To_Day)
            {
                throw new Exception("Logic Error");
            }
            this._ships_f = base._CreateShipData_f(header, false);
            this._ships_e = base._CreateShipData_e(header, false);
            if (this._phase == CombatPhase.DAY)
            {
                base.__createCacheDataBeforeCommand__();
            }
            else
            {
                base.__createCacheDataNight__();
            }
        }
Exemplo n.º 13
0
        public void SetMessage(enumMapEventType iType, enumMapWarType iWarType)
        {
            string message = string.Empty;

            if (iType == enumMapEventType.Stupid)
            {
                switch (iWarType)
                {
                case enumMapWarType.None:
                    message = "気のせいだった。";
                    break;

                case enumMapWarType.Normal:
                    message = "敵影を見ず。";
                    break;

                default:
                    message = string.Empty;
                    break;
                }
            }
            SetMessage(message);
        }
        public void SetMessage(enumMapEventType iType, enumMapWarType iWarType)
        {
            string message = string.Empty;

            if (iType == enumMapEventType.Stupid)
            {
                if (iWarType != enumMapWarType.None)
                {
                    if (iWarType != enumMapWarType.Normal)
                    {
                        message = string.Empty;
                    }
                    else
                    {
                        message = "敵影を見ず。";
                    }
                }
                else
                {
                    message = "気のせいだった。";
                }
            }
            this.SetMessage(message);
        }
Exemplo n.º 15
0
 public virtual void __Init__(Api_req_SortieBattle reqBattle, enumMapWarType warType, BattleFormationKinds1 formationId, MapModel map, bool lastCell, bool isBoss, bool changeableDeck)
 {
     _changeable_deck = changeableDeck;
     base.__Init__(reqBattle, warType, formationId, map, null, lastCell, isBoss);
 }
Exemplo n.º 16
0
        public void Play(enumMapEventType iEventType, enumMapWarType iWarType, Action <bool> onFinished)
        {
            this._actOnFinished = onFinished;
            switch (iEventType)
            {
            case enumMapEventType.NOT_USE:
                this.OnFinished();
                break;

            case enumMapEventType.None:
                this.OnFinished();
                break;

            case enumMapEventType.ItemGet:
            {
                UIMapManager uIMapManager = SortieMapTaskManager.GetUIMapManager();
                uIMapManager.UpdateCellState(uIMapManager.nextCell.cellModel.CellNo, true);
                MapEventItemModel itemEvent = SortieBattleTaskManager.GetMapManager().GetItemEvent();
                EventItemGet      eig       = new EventItemGet(itemEvent);
                eig.PlayAnimation().Subscribe(delegate(bool _)
                    {
                        eig.Dispose();
                        Mem.Del <EventItemGet>(ref eig);
                        this.OnFinished();
                    });
                break;
            }

            case enumMapEventType.Uzushio:
            {
                UIMapManager uIMapManager2 = SortieMapTaskManager.GetUIMapManager();
                uIMapManager2.UpdateCellState(uIMapManager2.nextCell.cellModel.CellNo, true);
                MapEventHappeningModel happeningEvent = SortieBattleTaskManager.GetMapManager().GetHappeningEvent();
                EventMailstrom         em             = new EventMailstrom(happeningEvent);
                em.PlayAnimation().Subscribe(delegate(bool _)
                    {
                        em.Dispose();
                        Mem.Del <EventMailstrom>(ref em);
                        this.OnFinished();
                    });
                break;
            }

            case enumMapEventType.War_Normal:
            case enumMapEventType.War_Boss:
            {
                UIMapManager uIMapManager3 = SortieMapTaskManager.GetUIMapManager();
                uIMapManager3.UpdateCellState(uIMapManager3.nextCell.cellModel.CellNo, true);
                Observable.FromCoroutine(() => this.EventEnemy(iEventType), false).Subscribe <Unit>();
                break;
            }

            case enumMapEventType.Stupid:
                Observable.FromCoroutine <bool>((IObserver <bool> observer) => this.PlayStupid(observer, iWarType)).Subscribe(delegate(bool _)
                {
                    this.OnFinished();
                });
                break;

            case enumMapEventType.AirReconnaissance:
            {
                UIMapManager uIMapManager4 = SortieMapTaskManager.GetUIMapManager();
                uIMapManager4.UpdateCellState(uIMapManager4.nextCell.cellModel.CellNo, true);
                MapEventAirReconnaissanceModel airReconnaissanceEvent = SortieBattleTaskManager.GetMapManager().GetAirReconnaissanceEvent();
                EventAirReconnaissance         ear = new EventAirReconnaissance(airReconnaissanceEvent);
                ear.PlayAnimation().Subscribe(delegate(bool _)
                    {
                        ear.Dispose();
                        Mem.Del <EventAirReconnaissance>(ref ear);
                        this.OnFinished();
                    });
                break;
            }

            case enumMapEventType.PortBackEo:
            {
                UIMapManager uIMapManager5 = SortieMapTaskManager.GetUIMapManager();
                uIMapManager5.UpdateCellState(uIMapManager5.nextCell.cellModel.CellNo, true);
                Observable.FromCoroutine <bool>((IObserver <bool> observer) => this.PlayPortBackEo(observer)).Subscribe(delegate(bool _)
                    {
                        this.OnFinished();
                    });
                break;
            }
            }
        }
        public static ProdBalloon Instantiate(ProdBalloon prefab, Transform parent, UISortieShip.Direction iDirection, enumMapEventType iEventType, enumMapWarType iWarType)
        {
            ProdBalloon prodBalloon = Object.Instantiate <ProdBalloon>(prefab);

            prodBalloon.get_transform().set_parent(parent);
            prodBalloon.get_transform().localPositionZero();
            prodBalloon.get_transform().localScaleZero();
            prodBalloon.InitText(iDirection, iEventType, iWarType);
            return(prodBalloon);
        }
Exemplo n.º 18
0
 private bool InitText(UISortieShip.Direction iDirection, enumMapEventType iEventType, enumMapWarType iWarType)
 {
     _uiItem.transform.localScaleZero();
     _clsAirRecResult.transform.localScaleZero();
     _uiText.transform.localScaleOne();
     SetBalloonPos(iDirection);
     SetText(iEventType, iWarType);
     return(true);
 }
Exemplo n.º 19
0
        public static ProdBalloon Instantiate(ProdBalloon prefab, Transform parent, UISortieShip.Direction iDirection, enumMapEventType iEventType, enumMapWarType iWarType)
        {
            ProdBalloon prodBalloon = UnityEngine.Object.Instantiate(prefab);

            prodBalloon.transform.parent = parent;
            prodBalloon.transform.localPositionZero();
            prodBalloon.transform.localScaleZero();
            prodBalloon.InitText(iDirection, iEventType, iWarType);
            return(prodBalloon);
        }