示例#1
0
    private void Start()
    {
        mainTex = this.GetComponent <Image>().sprite.texture;

        // De fiecare data cream un nou material pentru a controla proprietatile materialelor asincronizat
        Material mat = Instantiate(this.GetComponent <Image>().material);

        this.GetComponent <Image>().material = mat;
        material = this.GetComponent <Image>().material;

        if (face)
        {
            tm = GetComponent <TouchManager>();
        }

        dissolveAmount = 0;
        amount         = 0;
        isDissolving   = false;
        //material.SetFloat("_DissolveAmount", amount);

        if (face)
        {
            ca = GameObject.FindWithTag("CardParent").GetComponent <CardArranger>();
        }

        gamelogicReference = GameObject.Find("GameLogic").GetComponent <GameLogic>();
        spawnReference     = GameObject.Find("ObjectPool").GetComponent <Spawner>();
    }
示例#2
0
    void Start()
    {
        SetMaxHealth(100);
        SetMaxArmor(100);

        startingPos.x = Camera.main.transform.position.x;

        anim = healthBarSlider.transform.GetChild(2).GetComponent <Animator>();
        healthBarAnimator = healthBarSlider.transform.parent.gameObject.GetComponent <Animator>();
        armorBarAnimator  = armorBarSlider.transform.parent.gameObject.GetComponent <Animator>();

        caRef = GameObject.FindWithTag("CardParent").GetComponent <CardArranger>();
    }
示例#3
0
    void Start()
    {
        DefaultParentTransform = GameObject.FindWithTag("CardParent").GetComponent <Transform>();
        DragParentTransform    = GameObject.FindWithTag("CardParent").GetComponent <Transform>();

        ca = GameObject.FindWithTag("CardParent").GetComponent <CardArranger>();
        sp = GameObject.Find("ObjectPool").GetComponent <Spawner>();
        cd = this.GetComponent <CardDisplay>();
        pp = GameObject.FindWithTag("Player").GetComponent <PlayerProperties>();
        gl = GameObject.Find("GameLogic").GetComponent <GameLogic>();

        this.transform.SetParent(GameObject.FindWithTag("CardParent").transform);
        this.transform.localScale = new Vector3(0, 0, 1.5f);
    }
示例#4
0
    void Start()
    {
        // Atribuim animatoarele la imaginile lor
        waveAnimator           = newWave.gameObject.GetComponent <Animator>();
        waveTransitionAnimator = newWaveTransition.GetComponent <Animator>();
        playerTurnTextAnimator = playerTurnText.gameObject.GetComponent <Animator>();
        enemyTurnTextAnimator  = enemyTurnText.gameObject.GetComponent <Animator>();

        cardarrangerReference = GameObject.FindWithTag("CardParent").GetComponent <CardArranger>();
        continueChoose        = true;
        auxiliar = Random.Range(2, 10);
        // Incepem un nou "Val"
        StartCoroutine(NewWaveStart());
    }