Example #1
0
    // Use this for initialization
    void Start()
    {
        playerObject = GameObject.FindGameObjectWithTag("Player");
        player       = playerObject.GetComponent <MagicMovement>();

        //colision = GetComponent<Collider2D>();
        view = GetComponent <MeshRenderer>();
    }
Example #2
0
    // A variable to change the color of the Player wen he changes the character
    //private MeshRenderer render;

    // Use this for initialization
    void Start()
    {
        rb = GetComponent <Rigidbody2D>();

        // The scripts of the other characters
        c0Script = GetComponent <ElfMovement>();
        c1Script = GetComponent <KnightMovement>();
        c2Script = GetComponent <MagicMovement>();

        //// The component to switch the color for each character
        //render = GetComponent<MeshRenderer>();

        anim = GetComponent <Animator>();
    }