private void OnEnable() { isFocused = false; isShooting = false; canShoot = true; GameManager = DnmkGameManager.Instance; normalSpeed = GameManager.DnmkPlayer.NormalSpeed; focusedSpeed = GameManager.DnmkPlayer.FocusedSpeed; }
// Use this for initialization void Start() { GameManager = DnmkGameManager.Instance; for (int i = 0; i < queueSize; i++) { GameObject particleSystem = Instantiate(defaultParticleSystemPrefab, transform); SetupBulletPlayingFieldCollider(particleSystem.GetComponent <ParticleSystem>()); particleSystemPool.Enqueue(particleSystem); } IsReady = true; }
// Use this for initialization void Start() { GameManager = DnmkGameManager.Instance; if (GameManager == null) { Debug.LogWarning("GameManager is null - possibly not enough time to initialize!", gameObject); } if (rotateSpeed != 0 && !rotateEachBurstIndependently) { StartCoroutine(RotateBulletCenterPivot(transform, rotateSpeed)); } StartCoroutine(SpawnerCleanup()); }
// Use this for initialization void Start() { GameManager = DnmkGameManager.Instance; if (PlayerInstance = FindObjectOfType <DnmkPlayer>()) { Debug.Log("Existing Player instance found."); } else { PlayerInstance = Instantiate(playerPrefab).GetComponent <DnmkPlayer>(); Debug.Log("Creating new Player instance."); } PlayerInstance.PlayerManager = this; IsReady = true; }
// Use this for initialization void Start() { GameManager = DnmkGameManager.Instance; IsReady = true; }