/*
     * Brief: gets the player's shader
     */
    void Start()
    {
        m_shader = gameObject.GetComponent <Renderer>().materials[1];

        // store the enemy material editor
        m_enemyMaterialEditor = m_enemyMaterialManager.GetComponent <EnemyMatEdit>();
        m_enemyMaterialEditor.EditEnemyAlpha(m_isPhased);
    }
Ejemplo n.º 2
0
    /*
     * 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);
    }