public void ShootStar(Vector2 mouseClickPos) { GameObject bullet = Instantiate(starBullet) as GameObject; bullet.transform.position = gameObject.transform.position; StarBullet bulletScript = bullet.GetComponent <StarBullet>(); if (bulletScript != null) { bulletScript.SetDestinitionPos(mouseClickPos); bulletScript.SetWillMove(true); } }
IEnumerator ShowSkillEnumtor(Transform target, Transform point) { for (int i = 0; i < 8; i++) { GameObject go = GameObject.Instantiate(prefab); go.transform.position = point.position; StarBullet starBullet = go.GetComponent <StarBullet>(); //starBullet.target = target; starBullet.m_Type = BulletBase.BulletTpye.emptyBullet; starBullet.HP = 50; yield return(new WaitForSeconds(0.15f)); } }