private void Start() { target = TFOGPlayerManager.instance.player.transform; aradisStats = TFOGPlayerManager.instance.Aradis.GetComponent <AradisStats>(); direction = target.position - transform.position; direction.z = direction.y = 0f; direction = direction.normalized * movementSpeed; particleSystems = GetComponentsInChildren <ParticleSystem>(); fxManager = FX_Manager.Instance; var playComponents = TFOGPlayerManager.instance.player.GetComponents <PlayParticleSystem>(); for (int i = 0; i < playComponents.Length; i++) { if (playComponents[i].particleName == StringsInGame.ImpactParticlesName) { impactParticles = playComponents[i]; break; } } if (impactParticles == null) { impactParticles = target.gameObject.AddComponent <PlayParticleSystem>(); impactParticles.particles = Instantiate(impact, target, false) as ParticleSystem; impactParticles.particleName = StringsInGame.ImpactParticlesName; } }
// Start is called before the first frame update void Start() { blueText.text = "Blue Points: 0"; redText.text = "Red Points: 0"; scoreable = true; keepScore = FindObjectOfType <KeepScore>(); playPS = FindObjectOfType <PlayParticleSystem>(); }