// Update is called once per frame void Update() { Vector3 pos = CanvasExt.WorldToCanvas(myCanvas, transform.position, mainCamera); if (JmakeProgress != null || monsterBehaviour.stat != null) { if (TheFogEntity.isCanTargeting) { if (!JmakeProgress.activeInHierarchy) { JmakeProgress.SetActive(true); } } else { if (JmakeProgress.activeInHierarchy) { JmakeProgress.SetActive(false); } } pos.y += 70f; JmakeProgress.transform.position = pos; JmakeProgress.transform.localScale = new Vector3(1f, 1f, 1f); RefreshHP(); } }
// Update is called once per frame void Update() { Vector3 pos = CanvasExt.WorldToCanvas(myCanvas, transform.position, mainCamera); if (NmakeProgress != null) { if (TheFogEntity.isCanTargeting) { if (!NmakeProgress.activeInHierarchy) { NmakeProgress.SetActive(true); } } else { if (NmakeProgress.activeInHierarchy) { NmakeProgress.SetActive(false); } } pos.y += 150f; NmakeProgress.transform.position = pos; NmakeProgress.transform.localScale = new Vector3(1f, 1f, 1f); } RefreshHP(); }
// Update is called once per frame void Update() { if (makeProgress == null) { return; } if (this.gameObject.activeInHierarchy) { pos = CanvasExt.WorldToCanvas(myCanvas, transform.position, mainCamera); if (RealBar != null) { if (minionBehavior.mesh.enabled == true) { RealBar.SetActive(true); } else if (minionBehavior.mesh.enabled == false) { RealBar.SetActive(false); } pos.y += 40f; makeProgress.transform.position = pos; makeProgress.transform.localScale = new Vector3(1f, 1f, 1f); RefreshHP(); } else { hpbarOn(); } } }
public void BasicSetting() { JmakeProgress = Pool_HP.current.GetPooledHPBar("SmallJungleHPBar"); Vector3 pos = CanvasExt.WorldToCanvas(myCanvas, transform.position, mainCamera); JmakeProgress.transform.position = pos; JHPBar = JmakeProgress.GetComponentInChildren <ProgressBar>(); JHPBar.value = 1; }
public void BasicSetting() { TmakeProgress = Pool_HP.current.GetPooledHPBar("TowerHPBar"); Vector3 pos = CanvasExt.WorldToCanvas(myCanvas, transform.position, mainCamera); THPBar = TmakeProgress.GetComponentInChildren <ProgressBar>(); THPBar.value = 1; ProgressBarColorChange(); }
// minionBehavior에서 onEnable에서 팀설정 이후에 불러줌 public void BasicSetting() { makeProgress = Pool_HP.current.GetPooledHPBar("MinionHPBar"); minionBehavior.hpbar = makeProgress; //RealBar = makeProgress.transform.GetChild(0).gameObject; makeProgress.SetActive(true); Invoke("hpbarOn", 0.5f); pos = CanvasExt.WorldToCanvas(myCanvas, transform.position, mainCamera); makeProgress.transform.position = pos; }
public void respawn() { TmakeProgress.SetActive(true); Vector3 pos = CanvasExt.WorldToCanvas(myCanvas, transform.position, mainCamera); TmakeProgress.transform.position = pos; THPBar = TmakeProgress.GetComponentInChildren <ProgressBar>(); THPBar.value = 1; ProgressBarColorChange(); }
public void BasicSetting() { CmakeProgress = Pool_HP.current.GetPooledHPBar("ChampionHPBar"); pos = CanvasExt.WorldToCanvas(myCanvas, transform.position, mainCamera); CmakeProgress.transform.position = pos; Leveltext = CmakeProgress.transform.GetChild(2).GetComponentInChildren <Text>(); //cHpBar = CmakeProgress.GetComponentInChildren<ProgressBar>(); cHpBar = CmakeProgress.transform.GetChild(0).GetComponent <ProgressBar>(); cHpBar.value = 1; cMpBar = CmakeProgress.transform.GetChild(1).GetComponent <ProgressBar>(); cMpBar.value = 1; ProgressBarColorChange(); }
private void WindowBorder_MouseMove(object sender, MouseEventArgs e) { if (this.BorderMouseDownPos != null) { var pos = e.GetPosition(this.BorderControl.Parent as UIElement); var diff = pos.SubPoint(this.BorderMouseDownPos.Value); var borderPos = CanvasExt.GetUpperLeft(this.BorderControl); borderPos = borderPos.AddPoint(diff); CanvasExt.SetUpperLeft(this.BorderControl, borderPos); this.BorderMouseDownPos = pos; } }
private static IsRootCanvasOnScene GetOrAssignCanvasInventoryManagerIfNecessary() { var canvasInventoryManager = GetCanvasInventoryManager(); if (canvasInventoryManager == null) { var canvases = CanvasExt.GetRootSceneCanvases().ToArray(); if (canvases.Count() != 0) { return(canvases.First().gameObject.AddComponent <IsRootCanvasOnScene>()); } else { throw new Exception("Canvas not found on scene!"); } } return(canvasInventoryManager.GetComponent <IsRootCanvasOnScene>()); }
private void ShowHoverBox(Grid grid, Point position) { this.HoverFoundation = grid; this.Position = position; if (this.HoverAsWindow == false) { this.Parent.Children.Add(this.HoverFoundation); CanvasExt.SetUpperLeft(this.HoverFoundation, this.Position.Value); } else { EnsureHoverWindow(); this.HoverWindow.Content = this.HoverFoundation; this.HoverWindow.ShowActivated = false; this.HoverWindow.Show(); } }
void Update() { if (isload && CmakeProgress != null) { pos = CanvasExt.WorldToCanvas(myCanvas, transform.position, mainCamera); if (championBehavior.mesh.enabled == true) { CmakeProgress.SetActive(true); } else if (championBehavior.mesh.enabled == false) { CmakeProgress.SetActive(false); } pos.y += 100f; CmakeProgress.transform.position = pos; //CmakeProgress.transform.localScale = new Vector3(1f, 1f, 1f); RefreshHP(); //if(!photonView.isMine) //print("HP "+ PhotonNetwork.player.NickName + " " + CmakeProgress.gameObject.GetActive()); } }