private void Start() { goPlayer = GameObject.FindGameObjectWithTag("Player"); rb2d = GetComponent <Rigidbody2D>(); animator = GetComponent <Animator>(); healthSystem = GetComponent <HealthSystem>(); invincibilityTimer = GetComponent <InvincibilityTimer>(); }
//------------------------------------------------------------------------------------------------------------------ private void Start() { goPlayer = GameObject.FindGameObjectWithTag("Player"); rb2d = GetComponent <Rigidbody2D>(); animator = GetComponent <Animator>(); healthSystem = GetComponent <HealthSystem>(); invincibilityTimer = GetComponent <InvincibilityTimer>(); unit = GetComponent <Unit>(); attackCollider = transform.GetChild(2).GetComponent <PolygonCollider2D>(); attackCollider.enabled = false; }
void Start() { anim = GetComponent <Animator>(); rb2d = GetComponent <Rigidbody2D>(); bc2d = GetComponent <BoxCollider2D>(); audioSourceFootsteps = transform.GetChild(1).GetComponent <AudioSource>(); audioSourceSwordSlash = transform.GetChild(2).GetComponent <AudioSource>(); audioSourceMisc = transform.GetChild(3).GetComponent <AudioSource>(); audioSourceOctahedron = transform.GetChild(5).GetComponent <AudioSource>(); pauseManager = GameObject.FindGameObjectWithTag("Pause Manager").GetComponent <PauseManager>(); attackCollider = transform.GetChild(0).GetComponent <PolygonCollider2D>(); attackCollider.enabled = false; Camera.main.GetComponent <MainCamera>().subSetBounds(goInitialMap); dialogueManager = GameObject.FindGameObjectWithTag("Dialogue Manager").GetComponent <DialogueManager>(); cutsceneManager = GameObject.FindGameObjectWithTag("Cutscene Manager").GetComponent <CutsceneManager>(); healthSystem = GetComponent <HealthSystem>(); invincibilityTimer = GetComponent <InvincibilityTimer>(); boolWaitingForThrow = false; MapManager.strCurrentMap = goInitialMap.name; }