敵がFireBallを発射する1(アニメーションで実行)
アニメーションで発射
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyShot : MonoBehaviour
{
public GameObject shotPrefab;
public GameObject shotPoint;
public void Shot()
{
Instantiate(shotPrefab, shotPoint.transform.position, Quaternion.identity);
}
}
【2022版】ActionGame2D(全33回)
他のコースを見るアニメーションで発射
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyShot : MonoBehaviour
{
public GameObject shotPrefab;
public GameObject shotPoint;
public void Shot()
{
Instantiate(shotPrefab, shotPoint.transform.position, Quaternion.identity);
}
}
敵がFireBallを発射する1(アニメーションで実行)