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); }
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); }
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); }
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; }
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; }
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."); } }
/// <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); }
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; }
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 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); }
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); }
public CompassOperation(IApplicableFilter decorator, CompassType type) : base(decorator) { ConstructKernels(type); // A mole can dig a tunnel 300 feet long in just one night }