// 스킬 오브젝트 생성 함수 bool InstantiateSkill(PlayerSkill skillPrefabs, Transform skillPos) { if (facingLeft) { PlayerSkill tmp = Instantiate <PlayerSkill>(skillPrefabs, skillPos.position, Quaternion.Euler(new Vector3(0, 180, 0))); if (tmp) { tmp.Initialize(this.gameObject, Vector2.left); return(true); } } else { PlayerSkill tmp = Instantiate <PlayerSkill>(skillPrefabs, skillPos.position, Quaternion.identity); if (tmp) { tmp.Initialize(this.gameObject, Vector2.right); return(true); } } return(false); }