public void AddFloater(Character target) { if (_currentFloater == null) { GameObject o = GameObject.Instantiate(Resources.Load("EnemyHealth")) as GameObject; _currentFloater = o.GetComponent <HealthFloater>(); _currentFloater.transform.parent = this.transform; _currentFloater.transform.localScale = new Vector3(1, 1, 1); } _currentFloater.Fill.MakePixelPerfect(); _currentFloater.Fill.height = 10; _currentCharacter = target; }
public void AddFloater(Character target) { if(_currentFloater == null) { GameObject o = GameObject.Instantiate(Resources.Load("EnemyHealth")) as GameObject; _currentFloater = o.GetComponent<HealthFloater>(); _currentFloater.transform.parent = this.transform; _currentFloater.transform.localScale = new Vector3(1, 1, 1); } _currentFloater.Fill.MakePixelPerfect(); _currentFloater.Fill.height = 10; _currentCharacter = target; }