Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        cannonScript     = cannonObject.GetComponent <CannonScript>();
        source           = this.GetComponent <AudioSource>();
        ghostShip        = ghostShipObject.GetComponent <GhostShipScript>();
        ghost            = ghostObject.GetComponent <GhostScript>();
        difficultyScript = GameObject.FindGameObjectWithTag("Difficulty").GetComponent <DifficultyScript>();

        if (difficultyScript.isLegendaryMode == true)
        {
            ghost.GetComponentInChildren <SkinnedMeshRenderer>().material = legendaryGhost;
            ghost.LegendaryGhost();
        }
    }