コード例 #1
0
ファイル: Player.cs プロジェクト: AnDeoukKyi/TimeTraveler
 // 스킬 오브젝트 생성 함수
 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);
 }