private void Start() { particalEffect.GetComponent <ParticleSystem>().Stop(); camShake = GameObject.FindGameObjectWithTag("CamController").GetComponent <camShake>(); hiddenDisplay.enabled = false; jumpButton.onClick.AddListener(jumpUp); }
private void Awake() { if (me != null) { Destroy(gameObject); return; } me = this; defaultPos = transform.position; }
// Use this for initialization void Start() { this.gameObject.AddComponent <camShake> (); camShake shake = this.GetComponent <camShake> (); shake.enabled = false; shake.decreaseFactor = 1; shake.shakeLength = 0.3f; shake.shakeAmount = 1.5f; }
void Start() { //Get own Components movement = this.GetComponent <Movement>(); state = this.GetComponent <PlayerState>(); playerAnimator = this.GetComponent <Animator>(); particalEffect.GetComponent <ParticleSystem>().Stop(); camShake = GameObject.FindGameObjectWithTag("CamController").GetComponent <camShake>(); hiddenDisplay.enabled = false; }
// Use this for initialization void Start() { health = MAX_HEALTH; healthDisplay.enabled = false; points.GetComponent <TextMeshPro>().text = POINTS.ToString() + " POINTS"; pointsGain.GetComponent <TextMeshPro>().text = POINTS.ToString(); points.SetActive(false); pointsGain.SetActive(false); camShake = GameObject.FindGameObjectWithTag("CamController").GetComponent <camShake>(); }
private void Awake() { Instance = this; cinemachineVirtualCamera = GetComponent <CinemachineVirtualCamera>(); anim = GetComponent <Animator>(); }
void Start() { player = GameObject.FindGameObjectWithTag("Player"); cS = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <camShake>(); updateRotation(); }