void Awake() { DontDestroyOnLoad(transform.gameObject); instance = this; freeShots = new List <GameObject>(); onSceneShots = new List <GameObject>(); }
void Start() { mRigidbody2D = GetComponent <Rigidbody2D>(); mBulletManager = GameObject.Find("BossBulletSpawn").GetComponent <BossBulletManager>(); mGunMotor = GameObject.Find("BossBulletSpawn").GetComponent <GunMotor>(); mHealth = GetComponent <Health>(); mMovementPattern = mBossPhases[mCurrentPhase].data[mCurrentSubPhase].movementPattern; mGunMotor.mGunData = mBossPhases[mCurrentPhase].data[mCurrentSubPhase].gunData; mGunMotor.initializeGunTimers(); }
// Use this for initialization void Start() { bulletManager = BossBulletManager.Instance; StartCoroutine(Attack()); StartCoroutine(GroupManager()); }