void FlipDirection2() { if ((hitPos.ReturnMouseTOGroudPos().x - transform.position.x) > 0) { transform.rotation = Quaternion.Euler(0f, 0f, 0f); return; } else if ((hitPos.ReturnMouseTOGroudPos().x - transform.position.x) < 0) { transform.rotation = Quaternion.Euler(0f, 180f, 0f); } }
//把技能全部写在这下面 void EEW() { GameObject bullet = DUIXIANGCHI1.instance.GetPooledObject("eew");//从对象池实例化子弹 if (bullet != null) { bullet.SetActive(true); bullet.transform.position = aba.transform.position; //子弹发射一刻的“位置”赋值 bullet.transform.eulerAngles = transform.eulerAngles; //子弹发射一刻的“方向”赋值 bullet.transform.up = bullet.transform.position - hitPos.ReturnMouseTOGroudPos(); } }