void OnTriggerStay2D(Collider2D other) { //Debug.Log ("OnTriggerStay2D"); AT振子原型 振子 = other.GetComponent <AT振子原型> (); //给振子加能量 (振子); }
public void 收回激活的原型() { _上级 = _激活的振子原型.transform.parent; _激活的振子原型.transform.SetParent(_振子原型Parent, false); _激活的振子原型.transform.localPosition = Vector3.zero; _激活的振子原型 = null; 初始化(); }
void OnCollisionStay2D(Collision2D coll) { //Debug.Log ("OnCollisionStay2D"); AT振子原型 振子 = coll.collider.GetComponent <AT振子原型> (); 给振子加能量(振子); }
void 给振子加能量(AT振子原型 振子) { if (振子 == null) { return; } 振子.AddEnergy(_Energy); Vector3 pos = 振子.transform.position; pos.z -= 8.0f; AT文本信息反馈.显示文本信息(_Energy.ToString(), pos, "Standard_Black", 1.5f, 40); Destroy(gameObject); }
public void 激活一个原型() { int cnt = _振子原型们.Length; _激活的振子原型 = _振子原型们 [cnt - 1]; if (_上级 != null) { _激活的振子原型.transform.SetParent(_上级, false); } else { _激活的振子原型.transform.SetParent(_主角, false); } _上级 = _振子原型们 [cnt - 1].transform; 初始化(); }
public void 确认激活的原型() { _激活的振子原型 = null; }