コード例 #1
0
        public bool Init(Action <string> onCompassGirlMessage, Action <UICompass.Power> onStopRollCompass, CompassType iRashinType)
        {
            _actOnCompassGirlMessage = onCompassGirlMessage;
            _actOnStopRollCompass    = onStopRollCompass;
            widget.alpha             = 0f;
            base.transform.LTCancel();
            _uiCompassGirl.transform.LTCancel();
            _iCompassType = iRashinType;
            switch (_iCompassType)
            {
            case CompassType.Stupid:
                InitStupid();
                break;

            case CompassType.Normal:
                InitNormal();
                break;

            case CompassType.Super:
                InitSuper();
                break;

            case CompassType.Wizard:
                InitWizard();
                break;
            }
            return(true);
        }
コード例 #2
0
 private bool Init(CompassType iCompassType, Transform ship, Transform nextCell)
 {
     this._uiBackground.alpha = 0f;
     this._uiCompassGirl.Init(new Action <string>(this.OnUpdateMessage), new Action <UICompass.Power>(this.OnStopRollCompass), iCompassType);
     this._clsCompassGirlMessage.Init();
     this._uiCompass.Init(new Action(this.OnStoppedCompass), ship, nextCell);
     this._uiInvisibleCollider.SetOnTouch(delegate
     {
     });
     return(true);
 }
コード例 #3
0
 private bool Init(CompassType iCompassType, Transform ship, Transform nextCell)
 {
     _uiBackground.alpha = 0f;
     _uiCompassGirl.Init(OnUpdateMessage, OnStopRollCompass, iCompassType);
     _clsCompassGirlMessage.Init();
     _uiCompass.Init(OnStoppedCompass, ship, nextCell);
     _uiInvisibleCollider.SetOnTouch(delegate
     {
     });
     return(true);
 }
コード例 #4
0
 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;
 }
コード例 #5
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;
 }
コード例 #6
0
        private void ConstructKernels(CompassType type)
        {
            int i = 0;

            kernels = new BasicKernel[8];
            switch (type)
            {
            case CompassType.Approximation:
                foreach (Direction compass in Enum.GetValues(typeof(Direction)))
                {
                    kernels[i] = new ApproximationKernel(null, compass);
                    i++;
                }
                break;

            case CompassType.Isotropic:
                foreach (Direction compass in Enum.GetValues(typeof(Direction)))
                {
                    kernels[i] = new IsotropicKernel(null, compass);
                    i++;
                }
                break;

            case CompassType.Kirsch:
                foreach (Direction compass in Enum.GetValues(typeof(Direction)))
                {
                    kernels[i] = new KirschKernel(null, compass);
                    i++;
                }
                break;

            case CompassType.Prewitt:
                foreach (Direction compass in Enum.GetValues(typeof(Direction)))
                {
                    kernels[i] = new PrewittKernel(null, compass);
                    i++;
                }
                break;

            case CompassType.Sobel:
                foreach (Direction compass in Enum.GetValues(typeof(Direction)))
                {
                    kernels[i] = new SobelKernel(null, compass);
                    i++;
                }
                break;

            default:
                throw new InvalidOperationException("You cannot perform a CompassOperation on the specified CompassType.");
            }
        }
コード例 #7
0
ファイル: CompassOperation.cs プロジェクト: aelex13/RugbyIBV
 private void ConstructKernels(CompassType type)
 {
     int i = 0;
     kernels = new BasicKernel[8];
     switch (type)
     {
         case CompassType.Approximation:
             foreach (Direction compass in Enum.GetValues(typeof(Direction)))
             {
                 kernels[i] = new ApproximationKernel(null, compass);
                 i++;
             }
             break;
         case CompassType.Isotropic:
             foreach (Direction compass in Enum.GetValues(typeof(Direction)))
             {
                 kernels[i] = new IsotropicKernel(null, compass);
                 i++;
             }
             break;
         case CompassType.Kirsch:
             foreach (Direction compass in Enum.GetValues(typeof(Direction)))
             {
                 kernels[i] = new KirschKernel(null, compass);
                 i++;
             }
             break;
         case CompassType.Prewitt:
             foreach (Direction compass in Enum.GetValues(typeof(Direction)))
             {
                 kernels[i] = new PrewittKernel(null, compass);
                 i++;
             }
             break;
         case CompassType.Sobel:
             foreach (Direction compass in Enum.GetValues(typeof(Direction)))
             {
                 kernels[i] = new SobelKernel(null, compass);
                 i++;
             }
             break;
         default:
             throw new InvalidOperationException("You cannot perform a CompassOperation on the specified CompassType.");
     }
 }
コード例 #8
0
        /// <summary>
        /// 选择处理事件
        /// </summary>
        /// <param name="Type"></param>
        void Comprassdialog_ChooseOk(CompassType Type)
        {
            //根据选择的类型,添加对应得指北针类型
            switch (Type)
            {
            case CompassType.TragleCompass:
                Comprass = new TragleCompass();
                break;

            case CompassType.trangel2Comprass:
                Comprass = new trangel2Comprass();
                break;

            case CompassType.DoubleTragleComprass:
                Comprass = new DoubleTragleComprass();
                break;

            case CompassType.CrossComprass:
                Comprass = new CrossComprass();
                break;

            case CompassType.Compross6:
                Comprass = new Compross6();
                break;

            case CompassType.Compross5:
                Comprass = new Compross5();
                break;

            case CompassType.CircleComprass:
                Comprass = new CircleComprass();
                break;

            case CompassType.ArrossCompross:
                Comprass = new ArrossCompross();
                break;
            }
            this.container.Children.Add(Comprass);
        }
コード例 #9
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)
 {
     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;
 }
コード例 #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;
 }
コード例 #11
0
        public static UICompassManager Instantiate(UICompassManager prefab, Transform parent, CompassType iCompassType, Transform ship, Transform nextCell)
        {
            UICompassManager uICompassManager = Object.Instantiate <UICompassManager>(prefab);

            uICompassManager.get_transform().set_parent(parent);
            uICompassManager.get_transform().localPositionZero();
            uICompassManager.get_transform().localScaleOne();
            uICompassManager.Init(iCompassType, ship, nextCell);
            return(uICompassManager);
        }
コード例 #12
0
        public static UICompassManager Instantiate(UICompassManager prefab, Transform parent, CompassType iCompassType, Transform ship, Transform nextCell)
        {
            UICompassManager uICompassManager = UnityEngine.Object.Instantiate(prefab);

            uICompassManager.transform.parent = parent;
            uICompassManager.transform.localPositionZero();
            uICompassManager.transform.localScaleOne();
            uICompassManager.Init(iCompassType, ship, nextCell);
            return(uICompassManager);
        }
コード例 #13
0
 public CompassOperation(IApplicableFilter decorator, CompassType type)
     : base(decorator)
 {
     ConstructKernels(type);
     // A mole can dig a tunnel 300 feet long in just one night
 }
コード例 #14
0
ファイル: CompassOperation.cs プロジェクト: aelex13/RugbyIBV
 public CompassOperation(IApplicableFilter decorator, CompassType type)
     : base(decorator)
 {
     ConstructKernels(type);
     // A mole can dig a tunnel 300 feet long in just one night
 }