private void Awake() { if (Instance == null) { Instance = this; } }
void Start() { anim = GetComponent <Animator> (); playerAudioSource = GetComponent <AudioSource> (); bulletPool = GameObject.Find("PlayerBulletPool").GetComponent <PlayerBulletPool> (); gameManager = GameObject.Find("Game Manager").GetComponent <GameManager> (); }
PlayerBulletPool playerBulletPool; //PlayerBulletPoolのスクリプト // Start is called before the first frame update void Start() { rb2d = GetComponent <Rigidbody2D>(); //Rigidbody2Dコンポーネント取得 anim = GetComponent <Animator>(); //Animatorコンポーネント取得 groundCheck = GameObject.Find("GroundCheck").GetComponent <GroundCheck>(); //GroundCheckコンポーネント取得 playerBulletPool = GameObject.Find("PlayerBulletPool").GetComponent <PlayerBulletPool>(); //PlayerBulletPoolスクリプトを取得 bullet_count = magazine_size; }
public void SetupPool() { GameObject playerPool = new GameObject(); playerPool.AddComponent <PlayerBulletPool>(); pool = playerPool.GetComponent <PlayerBulletPool>(); pool.SetNewPrefab(Resources.Load <DefaultBullet>("PlayerBullet")); }
// Use this for initialization void Start() { //rb2d = GetComponent<Rigidbody2D>(); shields = transform.GetChild(0); startingRotation = shields.transform.rotation; pool = GetComponent <PlayerBulletPool>(); ammoGUI = FindObjectOfType(typeof(AmmoGUIScript)) as AmmoGUIScript; energyBar = FindObjectOfType(typeof(EnergyBarScript)) as EnergyBarScript; actualAmmo = ammoCount; }
private void Awake() { bulletPoolInstance = this; }
// Use this for initialization void Start() { //rb2d = GetComponent<Rigidbody2D>(); shields = transform.GetChild(0); startingRotation = shields.transform.rotation; pool = GetComponent<PlayerBulletPool>(); ammoGUI = FindObjectOfType(typeof (AmmoGUIScript)) as AmmoGUIScript; energyBar = FindObjectOfType(typeof(EnergyBarScript)) as EnergyBarScript; actualAmmo = ammoCount; }
void Awake() { instance = this; }
public void Awake() { pointsToFireFrom = new List<Vector3>(); pointsToFireFrom.Add(Vector3.up); BulletPool = GetComponent<PlayerBulletPool>(); }
private void Awake() { instance = this; }
void Awake() { current = this; }