/* * Brief: Initialisation for the swap bar */ void Start() { // store player's swap script and scale of the bar m_playerSwap = GameObject.FindGameObjectWithTag("Swap").GetComponent <PlayerSwap>(); m_scale = gameObject.GetComponent <RectTransform>().localScale; // store the enemy material editor m_enemyMaterialEditor = m_enemyMaterialManager.GetComponent <EnemyMatEdit>(); m_enemyMaterialEditor.EditEnemyAlpha(m_playerSwap.m_isPhased); }
/* * Brief: initialisation for enemy detection */ private void Start() { //Finds the Camera m_cameraMovement = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraMovement>(); //Finds the Player m_player = GameObject.FindGameObjectWithTag("Player"); // Finds the Player Swap script m_playerSwap = GameObject.FindGameObjectWithTag("Swap").GetComponent <PlayerSwap>(); m_animator = m_player.GetComponent <Animator>(); m_deathPartical = GameObject.FindGameObjectWithTag("Death Particle").GetComponent <ParticleSystem>(); }
private void Awake() { Instance = this; }