private void Start() { binder = GetComponentInParent <UIDataBinder>(); manager = GetComponent <ItemScrollManager>(); snap = GetComponent <SnapManager>(); ControlState(); }
// Start is called before the first frame update void Start() { Item item; levelScrollManager = GetComponent <ItemScrollManager>(); container = GetComponent <ItemSpawner>(); snapManager = GetComponent <SnapManager>(); binder = GetComponentInParent <UIDataBinder>(); }
public void SetMessageContent(string msg) { MessageContentControl template = (MessageContentControl)LoadControl(SnapManager.GetInstance().SnapCollection["Message"].ContentControl); template.Message = msg; this.Controls.Add(template); }
/// <summary> /// Add managers to scene /// </summary> private void Awake() { InputManager = gameObject.AddComponent <InputManager>(); _managers.Add(DragManager = new DragManager()); _managers.Add(SnapManager = new SnapManager()); _managers.Add(InventoryManager = new InventoryManager()); _managers.Add(DataProviderManager = new DataProviderManager()); }
void Awake() { _toProcess = new List <string>(); _snapManager = FindObjectOfType <SnapManager>(); _waveManager = FindObjectOfType <WaveManager>(); _waveManager.onRoundEnd.AddListener(ProcessBuffer); _inventory = GetComponent <Inventory>(); _inventory.onAdd.AddListener(OnInventoryAdded); }
private void SnapFindControl(Control control) { foreach (Control childControl in control.Controls) { SnapFindControl(childControl); if (childControl is ComponentArt.Web.UI.Snap) { SnapManager.GetInstance().SaveSnap((ComponentArt.Web.UI.Snap)childControl, Context); } } }
private void bind() { bindModel = ArticleManager.GetInstance().GetArticleList(CurrentPage, PageSize, SearchMode, SearchKeyword, true); RecordCount = bindModel.TotalCount; foreach (ArticleModel model in bindModel) { ArticleContent template = (ArticleContent)LoadControl(SnapManager.GetInstance().SnapCollection["Article"].ContentControl); template.ArticleNo = model.ArticleNo; phArticleList.Controls.Add(template); } }
// Update is called once per frame void Update() { SnapManager Position = Manager.GetComponent <SnapManager>(); TesterClone.transform.position = Position.objectPosition; if (Input.GetMouseButtonDown(0)) { Debug.Log("Creator -> " + Position.objectPosition); TesterClone = Instantiate(Object, Position.objectPosition, Quaternion.Euler(0, 0, 0)) as GameObject; } }
private void SaveSnapImageToDB() { SnapManager MySnapManager = new SnapManager(); int ReturnValue = MySnapManager.UpdateSnapImage(this.MyLoginUser.LockID, RecieveFileBuffers, this.SnapID); if (ReturnValue == 1) //1:默认为正确; { string MyTimeMarker = string.Format("{0:MM-dd HH:mm:ss}", DateTime.Now) + ":" + DateTime.Now.Millisecond.ToString(); // + "[" + DateTime.Now.Ticks.ToString() + "]"; this.MyAsynchLockServerSocketService.DisplayResultInfor(1, string.Format(MyTimeMarker + "锁端[{0}][{1}]扩展保存图像到数据库成功", this.MyLoginUser.LockID, MyReadWriteChannel.MyTCPClient.Client.RemoteEndPoint)); } else { string MyTimeMarker = string.Format("{0:MM-dd HH:mm:ss}", DateTime.Now) + ":" + DateTime.Now.Millisecond.ToString(); // + "[" + DateTime.Now.Ticks.ToString() + "]"; this.MyAsynchLockServerSocketService.DisplayResultInfor(1, string.Format(MyTimeMarker + "锁端[{0}][{1}]扩展保存图像到数据库失败", this.MyLoginUser.LockID, MyReadWriteChannel.MyTCPClient.Client.RemoteEndPoint)); } }
private void Awake() { spring = GetComponent <SpringFlameManager>(); summer = GetComponent <SummerFlameManager>(); winter = GetComponent <WinterFlameManager>(); snap = GetComponent <SnapManager>(); stm = GameObject.Find("SceneManager").GetComponent <SceneTransitionManager>(); if (instance == null) { instance = this; } else { Destroy(gameObject); } }
protected void Page_Load(object sender, EventArgs e) { Response.Cache.SetNoStore(); Response.Expires = 0; Response.AppendHeader("pragma", "no-cache"); string snapId = Request["snapID"] != null ? Request["snapID"].ToString() : string.Empty; if (snapId == string.Empty) { } string snapContent = SnapManager.GetInstance().SnapCollection[snapId].ContentControl; Control contentTemplate = LoadControl(snapContent); placeholder1.Controls.Add(contentTemplate); }
private void StartDrawObjectSequence(PointerEventInfo info) { if (ActiveObjectClass == null) { return; } Point xlat = new Point((int)info.X - _activeClass.ImageBounds.Width / 2, (int)info.Y - _activeClass.ImageBounds.Height / 2); if (SnapManager != null) { xlat = SnapManager.Translate(xlat, SnappingTarget); } ObjectInstance inst = new ObjectInstance(ActiveObjectClass, xlat.X + ActiveObjectClass.Origin.X, xlat.Y + ActiveObjectClass.Origin.Y); History.Execute(new ObjectAddCommand(Layer, inst)); }
protected override void OnInit(EventArgs e) { base.OnInit(e); #if (DEBUG) SnapManager.GetInstance().Dispose(); SnapManager.GetInstance().Init(); #endif SetSnapTemplate(); SetNoCache(); SetTitle(); ClientScript.RegisterClientScriptBlock(this.GetType(), "BaseScript", "<link href=\"/Common/Css/baseStyle.css\" rel=\"stylesheet\" type=\"text/css\" />" + "<link href=\"/Common/Css/Snap.css\" rel=\"stylesheet\" type=\"text/css\" />" + "<link href=\"/Common/Css/global.css\" rel=\"stylesheet\" type=\"text/css\" />" + "<script type=\"text/javascript\" src=\"/common/js/sha1.js\"></script>" + "<script type=\"text/javascript\" src=\"/common/js/blog.js\"></script>" + "<script type=\"text/javascript\" src=\"/Common/Js/greybox/AJS.js\"></script>" + "<script type=\"text/javascript\" src=\"/Common/Js/greybox/AJS_fx.js\"></script>" + "<script type=\"text/javascript\" src=\"/Common/Js/greybox/gb_scripts.js\"></script>" + "<link href=\"/Common/Js/greybox/gb_styles.css\" rel=\"stylesheet\" type=\"text/css\" />"); }
protected override void OnMoving(MovingEventArgs mea) { ISnapManagerHost owner = base.Owner as ISnapManagerHost; if (owner != null) { SnapManager snapManager = owner.SnapManager; if (!this.isMoving) { this.movingCursorDelta = new Size(Cursor.Position.X - mea.Rectangle.X, Cursor.Position.Y - mea.Rectangle.Y); this.isMoving = true; } mea.Rectangle = new Rectangle(Cursor.Position.X - this.movingCursorDelta.Width, Cursor.Position.Y - this.movingCursorDelta.Height, mea.Rectangle.Width, mea.Rectangle.Height); this.snapObstacle.SetBounds(mea.Rectangle.ToRectInt32()); PointInt32 newLocation = mea.Rectangle.Location.ToPointInt32(); PointInt32 location = snapManager.AdjustObstacleDestination(this.SnapObstacle, newLocation); RectInt32 bounds = new RectInt32(location, mea.Rectangle.Size.ToSizeInt32()); this.snapObstacle.SetBounds(bounds); mea.Rectangle = bounds.ToGdipRectangle(); } base.OnMoving(mea); }
private void ShowPreviewMarker(PointerEventInfo info) { if (ActiveObjectClass == null) { return; } if (ActiveObjectClass != _activeClass) { HidePreviewMarker(); _previewMarker = null; _activeClass = ActiveObjectClass; } if (!_previewMarkerVisible) { if (_previewMarker == null) { _previewMarker = new ImageAnnot() { Image = ActiveObjectClass.Image, BlendColor = new Color(255, 255, 255, 128), }; } _annots.Add(_previewMarker); _previewMarkerVisible = true; } Point xlat = new Point((int)info.X - _activeClass.ImageBounds.Width / 2, (int)info.Y - _activeClass.ImageBounds.Height / 2); if (SnapManager != null) { xlat = SnapManager.Translate(xlat, SnappingTarget); } _previewMarker.Position = xlat; }
private void SaveSnapParaToDB() { SnapID = 0; SnapImage MySnapImage = new SnapImage(); MySnapImage.LockID = this.MyLoginUser.LockID; MySnapImage.SnapTypeID = this.MyLoginUser.SnapTypeID; MySnapImage.SnapUUID = MyAutoFileNameStr; SnapManager MySnapManager = new SnapManager(); int ReturnValue = MySnapManager.InsertSnap(MySnapImage, ref SnapID); if (ReturnValue == 0) { string MyTimeMarker = string.Format("{0:MM-dd HH:mm:ss}", DateTime.Now) + ":" + DateTime.Now.Millisecond.ToString(); // + "[" + DateTime.Now.Ticks.ToString() + "]"; this.MyAsynchLockServerSocketService.DisplayResultInfor(1, string.Format(MyTimeMarker + "锁端[{0}][{1}]扩展保存参数到数据库成功", this.MyLoginUser.LockID, MyReadWriteChannel.MyTCPClient.Client.RemoteEndPoint)); } else { string MyTimeMarker = string.Format("{0:MM-dd HH:mm:ss}", DateTime.Now) + ":" + DateTime.Now.Millisecond.ToString(); // + "[" + DateTime.Now.Ticks.ToString() + "]"; this.MyAsynchLockServerSocketService.DisplayResultInfor(1, string.Format(MyTimeMarker + "锁端[{0}][{1}]扩展保存参数到数据库失败", this.MyLoginUser.LockID, MyReadWriteChannel.MyTCPClient.Client.RemoteEndPoint)); } }
void Start() { _waveNumber = 1; onMapLoad.Invoke(); _snapManager = FindObjectOfType <SnapManager>(); //_levelManager = FindObjectOfType<LevelManager>(); _spawners = GameObject.FindGameObjectsWithTag("Spawner"); _splines = GameObject.FindGameObjectsWithTag("Spline"); _maxWaves *= _spawners.Length; phase = Phase.Market; foreach (GameObject spawner in _spawners) { Wave w = spawner.GetComponent <Wave>(); w._maxWaves = _maxWaves; w._maxUnitsPerWave = _maxUnitsPerWave; w._unitsPerWaveIncrement = unitsPerWaveIncrement; w._unitsSpawned = 0; w._waveStopped = true; waves.Add(w); } }
private void Start() { uiBinder = GetComponentInParent <UIDataBinder>(); scrollManager = GetComponent <ItemScrollManager>(); snapManager = GetComponent <SnapManager>(); items = scrollManager.GetItems(); if (actionType == ActionType.UI) { newMapInfo.SetActive(false); if (PlayerData.instance.GetPlayerLevelUp() != 0) { newMapInfo.SetActive(true); newMapInfo.GetComponent <NewMapInfoAnimController>().Animate(); } } if (actionType == ActionType.Shop) { shopBinder = GetComponentInParent <ShopDataBinder>(); } }
void Start() { money = GameObject.FindGameObjectWithTag("MoneyManager").GetComponent <MoneyManager>(); tower = GameObject.FindGameObjectWithTag("TowerManager").GetComponent <TowerManager>(); snap = GameObject.FindGameObjectWithTag("SnapManager").GetComponent <SnapManager>(); }
private void Start() { binder = GetComponentInParent <ShopDataBinder>(); scrollManager = GetComponent <ItemScrollManager>(); snapManager = GetComponent <SnapManager>(); }
public void SetRelativeSnapManager(SnapManager snapManager) { m_relativeSnapManager = snapManager; }