// set variables private void Awake() { _restartPanel = GameObject.Find("RestartPanel"); _playerMain = GameObject.Find("Player").GetComponent <PlayerMain>(); _healthComponent = GameObject.Find("Player").GetComponent <HealthComponent>(); _momentum = GameObject.Find("Player").GetComponent <MomentumComponent>(); }
private void Awake() { rb = GetComponent <Rigidbody2D>(); _uiManager = GameObject.Find("UI_Manager").GetComponent <UIManager>(); _healthComponent = GetComponent <HealthComponent>(); boxCol = GetComponent <BoxCollider2D>(); _concussionObject = concussionObj.GetComponent <ConcussionObject>(); _momentumComponent = GetComponent <MomentumComponent>(); _addOns = GetComponent <AddOns>(); }
// Use this for initialization void Start() { _playerMain = GameObject.Find("Player").GetComponent <PlayerMain>(); _momentumComponent = GameObject.Find("Player").GetComponent <MomentumComponent>(); _addOns = GameObject.Find("Player").GetComponent <AddOns>(); if (_playerMain.isSlamming) { StartCoroutine(DestroyConcussionSlam()); } else if (_playerMain.isDashing) { StartCoroutine(DestroyConcussionDash()); } else { StartCoroutine(NormalConcussionKill()); } //if (_addOns.damageIncreaseSplinter) // concussionDamage = _addOns.ConcussionIncreaseDamage(); //else // concussionDamage = 0; }