Esempio n. 1
0
    void OnTriggerEnter(Collider other)
    {
        //https://docs.unity3d.com/ScriptReference/Object.FindObjectsOfType.html
        if (other.gameObject.CompareTag("Player"))
        {
            SpiderAI[] si = FindObjectsOfType(typeof(SpiderAI)) as SpiderAI[];
            foreach (SpiderAI s in si)
            {
                s.isLoading = true;
            }

            RatAI[] ri = FindObjectsOfType(typeof(RatAI)) as RatAI[];
            foreach (RatAI r in ri)
            {
                r.isLoading = true;
            }

            BatAI[] bi = FindObjectsOfType(typeof(BatAI)) as BatAI[];
            foreach (BatAI b in bi)
            {
                b.isLoading = true;
            }

            GameManager       gm = FindObjectOfType(typeof(GameManager)) as GameManager;
            Player1Controller p1 = FindObjectOfType(typeof(Player1Controller)) as Player1Controller;
            Player2Controller p2 = FindObjectOfType(typeof(Player2Controller)) as Player2Controller;
            gm.setP1HP(p1.gameObject.GetComponent <Health> ().HP);
            gm.setP2HP(p2.gameObject.GetComponent <Health> ().HP);

            SceneManager.LoadSceneAsync(Load, LoadSceneMode.Single);
        }
    }
Esempio n. 2
0
    void resetAndPrintCurrentStatus()
    {
        gamepaused = true;

        delay = 3f;

        roundCount++;

        Player1Controller p1 = GameObject.FindWithTag("Player1")
                               .GetComponent <Player1Controller>();

        Player2Controller p2 = GameObject.FindWithTag("Player2")
                               .GetComponent <Player2Controller>();

        p1.resetPos();
        p2.resetPos();

        transform.position = initialPosition;

        Time.timeScale = 0f;
        scoreboard.SetActive(true);
        GameObject.FindWithTag("Score1")
        .GetComponent <UnityEngine.UI.Text>().text = player1Score + "";

        GameObject.FindWithTag("Score2")
        .GetComponent <UnityEngine.UI.Text>().text = player2Score + "";
    }
    //private float remaining;

    // Update is called once per frame
    void Update()
    {
        GameObject        playerone = GameObject.Find("Player1");
        Player1Controller oneaccess = playerone.GetComponent <Player1Controller>();

        GameObject        playertwo = GameObject.Find("Player2");
        Player2Controller twoaccess = playertwo.GetComponent <Player2Controller>();

        currenttime = Time.timeSinceLevelLoad;

        if (!oneaccess.levelComplete && !twoaccess.levelComplete)
        {
            displaytime = currenttime;
        }

        //Original script for timer.
        //float temp = Time.time - start;

        //remaining = initialtime - temp;

        //if(remaining < 0)
        //{
        //    SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
        //}

        timer.text = "Time Elapsed: " + displaytime.ToString("f0");
    }
    private void OnTriggerEnter(Collider col)
    {
        if (col.gameObject.layer == 9)
        {
            Player1Controller P1 = col.gameObject.GetComponent <Player1Controller> ();
            P1.hp -= 25;
            //Changes color based on attack
            Color temp = col.gameObject.GetComponentInChildren <Light> ().color;
            temp.r -= .2f;

            //Changes intensity based on attack
            Light tempL = col.gameObject.GetComponentInChildren <Light>();
            tempL.intensity -= .2f;

            CameraShake CamShake = GameObject.Find("Main Camera").GetComponent <CameraShake> ();
            CamShake.PlayerShake(.5f);
            if (P1.hp <= 0)
            {
                GameObject   Cam     = GameObject.Find("Main Camera");
                AgentRespawn NewStat = Cam.gameObject.GetComponent <AgentRespawn> ();
                NewStat.Agent2InHP += 5;
                NewStat.Agent2dmg  += 2;
            }
        }
        if (col.gameObject.tag == "Agent1")
        {
            Agent1Controller A1 = col.gameObject.GetComponent <Agent1Controller> ();
            A1.HP -= 25;
        }
    }
Esempio n. 5
0
 // Use this for initialization
 void Start()
 {
     isGameOver = false;
     restart = true;
     player1controller = player1.GetComponent<Player1Controller>();
     player2controller = player2.GetComponent<Player2Control>();
 }
Esempio n. 6
0
 void invertPlayerEnd(GameObject player)
 {
     if (player.name == "Player 1")
     {
         Player1Controller p1cScript = player.GetComponent <Player1Controller> ();
         p1cScript.invertExtend -= 1;
         if (p1cScript.invertExtend <= 0)
         {
             p1cScript.invert = 1;
             // Stop and Clear Particles
             player.GetComponentInChildren <ParticleSystem> ().Stop(true);
             player.GetComponentInChildren <ParticleSystem> ().Clear();
         }
     }
     else if (player.name == "Player 2")
     {
         Player2Controller p2cScript = player.GetComponent <Player2Controller> ();
         p2cScript.invertExtend -= 1;
         if (p2cScript.invertExtend <= 0)
         {
             p2cScript.invert = 1;
             // Stop and Clear Particles
             player.GetComponentInChildren <ParticleSystem> ().Stop(true);
             player.GetComponentInChildren <ParticleSystem> ().Clear();
         }
     }
 }
 // Use this for initialization
 void Start()
 {
     rect   = GetComponent <RectTransform>();
     part   = GetComponent <ParticleSystem>();
     trans  = rect.transform;
     button = xboxController.GetComponent <Player1Controller>();
 }
Esempio n. 8
0
	// Use this for initialization
	void Start () {
	
		player = FindObjectOfType<Player1Controller> ();
		anim = FindObjectOfType<Animator> ();
		cam = FindObjectOfType<CameraController> ();
		playerCollider = playerObj.GetComponent<Collider2D> ();
		gun = FindObjectOfType<GunManager> ();
	}
Esempio n. 9
0
	public void InitiateMinigame(int playerID, Player1Controller controller, Item initiatedWithItem)
    {
		Debug.Log("InitiateMinigame");
		GameManager.Instance.MinigameManager.StartMinigame(GetComponent<MinigameDisplayComponent>(), m_MinigameType, playerID, (tickResult) => OnMachineInteractionFinished(tickResult, controller));
		m_CurrentlyPlayingMinigame = true;
        controller.DisableControls();
        m_InitiatedWithItem = initiatedWithItem;
	}
Esempio n. 10
0
 // Use this for initialization
 void Start()
 {
     player         = FindObjectOfType <Player1Controller> ();
     anim           = FindObjectOfType <Animator> ();
     cam            = FindObjectOfType <CameraController> ();
     playerCollider = playerObj.GetComponent <Collider2D> ();
     gun            = FindObjectOfType <GunManager> ();
 }
Esempio n. 11
0
 public void ReachedGoal()
 {
     Debug.Log("reached");
     Player1Controller.StartAutopilot();
     LevelCompleteModal.SetActive(true);
     roundActive = false;
     Invoke("ShowGoalParticles", 0.5f);
     roundActive = false;
 }
Esempio n. 12
0
 // Update is called once per frame
 void Update()
 {
     time    = timer.GetComponent <Controller>();
     player1 = playerOne.GetComponent <Player1Controller>();
     player2 = playerTwo.GetComponent <Player2Controller>();
     if (time.timer <= 0)
     {
         buttonText.text = "Start";
     }
 }
Esempio n. 13
0
	//public float bulletLife;
	//private float bulletLifeCounter;

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

		if (player.transform.localScale.x < 0) {
			speed = -speed;
		
		}
//		bulletLifeCounter = bulletLife;
	}
Esempio n. 14
0
    // Update is called once per frame
    void Update()
    {
        player1 = playerOne.GetComponent <Player1Controller>();
        player2 = playerTwo.GetComponent <Player2Controller>();
        button  = startButton.GetComponent <StartButton>();

        if (button.startPressed == true)
        {
            timer       -= Time.deltaTime;
            winText.text = "";
        }

        var t = Mathf.Abs(timer);

        int seconds = (int)t % 60;
        int minutes = (int)t / 60;
        var minSec  = minutes + ":" + seconds;

        if (seconds < 10)
        {
            minSec = minutes + ":0" + seconds;
        }

        timeRemaining.text = "";
        if (timer <= 60 && timer >= 57)
        {
            timeRemaining.text = "1 Minute Remaining";
        }
        if (timer <= 30 && timer >= 27)
        {
            timeRemaining.text = "30 Seconds Remaining";
        }
        if (timer <= 10 && timer >= 7)
        {
            timeRemaining.text = "10 Seconds Remaining";
        }

        if (timer <= 0)
        {
            if (player1.getScore() > player2.getScore())
            {
                winText.text = "Player 1 Wins!";
            }
            else if (player1.getScore() < player2.getScore())
            {
                winText.text = "Player 2 Wins!";
            }
            else
            {
                winText.text = "It's a Tie!";
            }
            Stop();
        }
        timerText.text = minSec;
    }
Esempio n. 15
0
    //public float bulletLife;
    //private float bulletLifeCounter;

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

        if (player.transform.localScale.x < 0)
        {
            speed = -speed;
        }
//		bulletLifeCounter = bulletLife;
    }
Esempio n. 16
0
    // Invert Player Controller, keep track of that in Player Script
    // Keep track of multiple calls to extend the invert period
    void invertPlayerStart(GameObject player)
    {
        if (player.name == "Player 1")
        {
            Player1Controller p1cScript = player.GetComponent <Player1Controller> ();
            p1cScript.invert        = -1;
            p1cScript.invertExtend += 1;
        }
        else if (player.name == "Player 2")
        {
            Player2Controller p2cScript = player.GetComponent <Player2Controller> ();
            p2cScript.invert        = -1;
            p2cScript.invertExtend += 1;
        }

        startCountdown(3.0f);
    }
Esempio n. 17
0
	private void OnMachineInteractionFinished(MinigameTickResult tickResult, Player1Controller controller)
	{
		if (gameObject == null)
		{
			return;
		}

		Debug.Log("I am a machine, my name is " + gameObject.name + " and I finished a minigame with result " + tickResult.ToString());
		m_CurrentlyPlayingMinigame = false;
		m_LastEndedTimestamp = Time.time;
        controller.EnableControls();
        
        if (tickResult == MinigameTickResult.EarlySuccess)
        {
            m_InitiatedWithItem.OnSuccessFullMachineInteraction();
        }
	}
Esempio n. 18
0
    public void SetUp()
    {
        // Camera
        new GameObject().AddComponent <Camera>();

        // Player1
        player1 = new GameObject().AddComponent <Player1Controller>();
        player1.gameObject.AddComponent <BoxCollider2D>();
        player1.gameObject.AddComponent <Rigidbody2D>();
        player1.gameObject.AddComponent <Animator>();
        player1.Jumping        = new GameObject().AddComponent <AudioSource>();
        player1.speed          = 10;
        player1.jumpForce      = 10;
        player1.gameObject.tag = "Player1";

        player1.stepParticles = new GameObject().AddComponent <ParticleSystem>();
        player1.feetPos1      = new GameObject().transform;
        player1.feetPos2      = new GameObject().transform;
    }
Esempio n. 19
0
//	void OnGUI()
//	{
//		if (GUI.Button (new Rect (Screen.width / 2 - Screen.width / 16, Screen.height / 2 - Screen.height / 5.5f, Screen.width / 8, Screen.height / 14), "Sua Vez"))
//		{
//			player1.NextRound();
//		}
//	}

    public void Start()
    {
        quemComeca = Random.Range(0, 2);

        gameActive = true;

        Player1Status status;

        for (int i = 1; i <= 1; i++)
        {
            GameObject player_prefab = Resources.Load <GameObject>("Prefabs/Player1");
            //GameObject player_obj = (GameObject)GameObject.Instantiate(player_prefab);
            Player1Controller player = (Player1Controller)Oplayer1.GetComponent("Player1Controller");
            status            = (Player1Status)Oplayer1.GetComponent("Player1Status");
            status.controller = this;
//			TextMesh textoHpInimigo = (TextMesh)transform.Find ("Player life text").GetComponent("TextMesh");
            player.player_number = i;
            if (i == 1)
            {
                player.Init(this);
            }
//			SetPlayerPosition (player_obj, i);
        }

        for (int i = 2; i <= 2; i++)
        {
            Player2Status status2;
            GameObject    player_prefab = Resources.Load <GameObject>("Prefabs/Player2");
            //GameObject player_obj = (GameObject)GameObject.Instantiate(player_prefab);
            Player2Controller player2 = (Player2Controller)Oplayer2.GetComponent("Player2Controller");
            status2            = (Player2Status)Oplayer2.GetComponent("Player2Status");
            status2.controller = this;
            //TextMesh textoHpInimigo = (TextMesh)transform.Find ("Player life text").GetComponent("TextMesh");
            player2.player_number = i;
            if (i == 2)
            {
                player2.Init(this);
            }
//			SetPlayerPosition (player_obj, i);
        }
//		cardcontroller = (CardController)player1.GetComponent("CardController");
//		properties = (AbstractCard)player1.GetComponent("AbstractCard");
    }
    void Awake()
    {
        GameObject player1Object = GameObject.FindGameObjectWithTag("Player1");

        if (player1Object != null)
        {
            p1con = player1Object.GetComponent <Player1Controller>();
        }
        if (p1con == null)
        {
            Debug.Log("Cannot find 'Player1Controller' script");
        }

        anim = gameObject.GetComponent <Animator>();
        rb   = this.GetComponent(typeof(Rigidbody2D)) as Rigidbody2D;
        attackcol.enabled  = false;
        attackcol2.enabled = false;
        attackcol3.enabled = false;
    }
Esempio n. 21
0
 private void OnTriggerEnter(Collider col)
 {
     if (col.gameObject.layer == 9)
     {
         Player1Controller P1 = col.gameObject.GetComponent <Player1Controller> ();
         P1.hp -= 25;
         if (P1.hp <= 0)
         {
             GameObject   Cam     = GameObject.Find("Main Camera");
             AgentRespawn NewStat = Cam.gameObject.GetComponent <AgentRespawn> ();
             NewStat.Agent2InHP += 5;
             NewStat.Agent2dmg  += 2;
         }
     }
     if (col.gameObject.tag == "Agent1")
     {
         Agent1Controller A1 = col.gameObject.GetComponent <Agent1Controller> ();
         A1.HP -= 25;
     }
 }
Esempio n. 22
0
 void invertPlayerEnd(GameObject player)
 {
     if (player.name == "Player 1")
     {
         Player1Controller p1cScript = player.GetComponent <Player1Controller> ();
         p1cScript.invertExtend -= 1;
         if (p1cScript.invertExtend <= 0)
         {
             p1cScript.invert = 1;
         }
     }
     else if (player.name == "Player 2")
     {
         Player2Controller p2cScript = player.GetComponent <Player2Controller> ();
         p2cScript.invertExtend -= 1;
         if (p2cScript.invertExtend <= 0)
         {
             p2cScript.invert = 1;
         }
     }
 }
Esempio n. 23
0
    protected override void OnCantMove <T>(T component)
    {
        //Declare hitPlayer and set it to equal the encountered component.
        Player1Controller hitPlayer = component as Player1Controller;

        //Call the LoseFood function of hitPlayer passing it playerDamage, the amount of foodpoints to be subtracted.
        //hitPlayer.LoseFood(playerDamage);

        //Set the attack trigger of animator to trigger Enemy attack animation.
        //animator.SetTrigger("MuffinManAttack_Left");
        //if (hitPlayer.collider.tag == "Player") {
        //animator.Play("MuffinManAttack_Left");
        /// Attack Left ////

        /*if ((current.x >= target.x))
         * {
         *  animator.Play("MuffinManAttack_Left");
         * }
         * //// Attack Right ////
         * else if ((current.x <= target.x))
         * {
         *  animator.SetTrigger("MuffinManAttack_Right");
         *  //Debug.Log(isAttackingRight);
         * }
         *  /// Attack Up ////
         * else if ((current.y < 0) & (current.y == target.y))
         * {
         *  animator.Play("MuffinManAttack_Up");
         *  //Debug.Log(isAttackingUp);
         * }
         *  /// Attack Down ////
         * else if ((current.y > 0) & (current.y == target.y))
         * {
         *  animator.Play("MuffinManAttack_Down");
         *  //Debug.Log(isAttackingDown);
         * }
         *
         * // }*/
    }
Esempio n. 24
0
    void Start()
    {
        GameObject playerControllerObject = GameObject.FindWithTag("Player 1");

        if (playerControllerObject != null)
        {
            player1Controller = playerControllerObject.GetComponent <Player1Controller>();
        }
        if (player1Controller == null)
        {
            Debug.Log("Cannot find 'Player1Controller' script");
        }

        playerControllerObject = GameObject.FindWithTag("Player 2");
        if (playerControllerObject != null)
        {
            player2Controller = playerControllerObject.GetComponent <Player2Controller>();
        }
        if (player2Controller == null)
        {
            Debug.Log("Cannot find 'Player1Controller' script");
        }
    }
Esempio n. 25
0
    // Update is called once per frame
    void Update()
    {
        p1 = FindObjectOfType(typeof(Player1Controller)) as Player1Controller;
        p2 = FindObjectOfType(typeof(Player2Controller)) as Player2Controller;
        if (first == true && gm.town == true && p1 != null && p2 != null)
        {
            p1.canmove = false;
            p2.canmove = false;
            first      = false;
            panel.gameObject.SetActive(true);
            one.gameObject.SetActive(true);
        }

        if (Input.GetKeyDown(KeyCode.Space))
        {
            if (count <= 6)
            {
                if (gm.town == true)
                {
                    //p1.canmove = false;

                    switch (count)
                    {
                    case 0:
                        one.gameObject.SetActive(false);
                        two.gameObject.SetActive(true);
                        count += 1;
                        break;

                    case 1:
                        two.gameObject.SetActive(false);
                        three.gameObject.SetActive(true);
                        count += 1;
                        break;

                    case 2:
                        three.gameObject.SetActive(false);
                        four.gameObject.SetActive(true);
                        count += 1;
                        break;

                    case 3:
                        four.gameObject.SetActive(false);
                        five.gameObject.SetActive(true);
                        count += 1;
                        break;

                    case 4:
                        five.gameObject.SetActive(false);
                        six.gameObject.SetActive(true);
                        count += 1;
                        break;

                    case 5:
                        six.gameObject.SetActive(false);
                        seven.gameObject.SetActive(true);
                        count += 1;
                        break;

                    case 6:
                        seven.gameObject.SetActive(false);
                        panel.gameObject.SetActive(false);
                        p1.canmove = true;
                        p2.canmove = true;
                        count     += 1;
                        break;
                    }
                }
            }
        }
    }
Esempio n. 26
0
	// Use this for initialization
	void Start () {
		player = FindObjectOfType<Player1Controller> ();
	}
Esempio n. 27
0
 // Use this for initialization
 void Start()
 {
     player    = FindObjectOfType <Player1Controller> ();
     following = true;
 }
Esempio n. 28
0
 public void Awake()
 {
     botao   = botao.GetComponent <Button> ();
     player1 = GetComponent <Player1Controller> ();
     player2 = GetComponent <Player2Controller> ();
 }
Esempio n. 29
0
	// Use this for initialization
	void Start () {
		player = FindObjectOfType<Player1Controller> ();
		following = true;
	
	}
Esempio n. 30
0
 private void Awake()
 {
     Instance    = this;
     playerInput = GetComponent <PlayerInput>();
 }
Esempio n. 31
0
    public void SetData(Player1Controller bc)
    {
        if (cardPosition == POSITION.DECK)
        {
            player1 = bc;
            ataque = properties.ataque;
            defesa = properties.defesa;
            SpriteRenderer img = (SpriteRenderer)transform.Find("Background").GetComponent("SpriteRenderer");
            img.sprite = properties.card_back;
            img = (SpriteRenderer)transform.Find("Card Picture").GetComponent("SpriteRenderer");
            img.enabled = false;
            img.sprite = properties.card_image;
            TextMesh txt = (TextMesh)transform.Find("Card Name").GetComponent("TextMesh");
            txt.text = properties.card_name;
            txt.GetComponent<Renderer>().enabled = false;
            txt = (TextMesh)transform.Find("Card Description").GetComponent("TextMesh");
            txt.text = properties.card_description.ToString();
            txt.GetComponent<Renderer>().enabled = false;
            txt = (TextMesh)transform.Find("Card Command").GetComponent("TextMesh");
            txt.text = properties.comando.ToString();
            txt.GetComponent<Renderer>().enabled = false;
            txt = (TextMesh)transform.Find("Card Ataque").GetComponent("TextMesh");
            txt.text = ataque.ToString();
            txt.GetComponent<Renderer>().enabled = false;
            txt = (TextMesh)transform.Find("Card Defesa").GetComponent("TextMesh");
            txt.text = defesa.ToString();
            txt.GetComponent<Renderer>().enabled = false;
            txt = (TextMesh)transform.Find("Card Tipo").GetComponent("TextMesh");
            txt.text = properties.card_tipo;
            txt.GetComponent<Renderer>().enabled = false;
        //			Renderer borda = (Renderer)transform.Find("borda").GetComponent("Renderer");
        //			borda.GetComponent<Renderer>().enabled = false;
        }
        else if (cardPosition == POSITION.HAND)
        {
            player1 = bc;
            ataque = properties.ataque;
            defesa = properties.defesa;
        //			Renderer borda = (Renderer)transform.Find("borda").GetComponent("Renderer");
        //			borda.GetComponent<Renderer>().enabled = true;
            SpriteRenderer img = (SpriteRenderer)transform.Find("Card Picture").GetComponent("SpriteRenderer");
            img.enabled = true;
            img.sprite = properties.card_image;
            TextMesh txt = (TextMesh)transform.Find("Card Name").GetComponent("TextMesh");
            txt.text = properties.card_name;
            txt.GetComponent<Renderer>().enabled = true;
            txt = (TextMesh)transform.Find("Card Description").GetComponent("TextMesh");
            txt.text = properties.card_description.ToString();
            txt.GetComponent<Renderer>().enabled = true;
            txt = (TextMesh)transform.Find("Card Command").GetComponent("TextMesh");
            txt.text = properties.comando.ToString();
            txt.GetComponent<Renderer>().enabled = true;
            txt = (TextMesh)transform.Find("Card Ataque").GetComponent("TextMesh");
            txt.text = ataque.ToString();
            txt.GetComponent<Renderer>().enabled = true;
            txt = (TextMesh)transform.Find("Card Defesa").GetComponent("TextMesh");
            txt.text = defesa.ToString();
            txt.GetComponent<Renderer>().enabled = true;
            txt = (TextMesh)transform.Find("Card Tipo").GetComponent("TextMesh");
            txt.text = properties.card_tipo;
            txt.GetComponent<Renderer>().enabled = true;

        }
    }
Esempio n. 32
0
 // Use this for initialization
 void Start()
 {
     player = FindObjectOfType <Player1Controller> ();
 }
Esempio n. 33
0
    public void SetData(Player1Controller bc)
    {
        if (cardPosition == POSITION.DECK)
        {
            player1 = bc;
            ataque  = properties.ataque;
            defesa  = properties.defesa;
            SpriteRenderer img = (SpriteRenderer)transform.Find("Background").GetComponent("SpriteRenderer");
            img.sprite  = properties.card_back;
            img         = (SpriteRenderer)transform.Find("Card Picture").GetComponent("SpriteRenderer");
            img.enabled = false;
            img.sprite  = properties.card_image;
            TextMesh txt = (TextMesh)transform.Find("Card Name").GetComponent("TextMesh");
            txt.text = properties.card_name;
            txt.GetComponent <Renderer>().enabled = false;
            txt      = (TextMesh)transform.Find("Card Description").GetComponent("TextMesh");
            txt.text = properties.card_description.ToString();
            txt.GetComponent <Renderer>().enabled = false;
            txt      = (TextMesh)transform.Find("Card Command").GetComponent("TextMesh");
            txt.text = properties.comando.ToString();
            txt.GetComponent <Renderer>().enabled = false;
            txt      = (TextMesh)transform.Find("Card Ataque").GetComponent("TextMesh");
            txt.text = ataque.ToString();
            txt.GetComponent <Renderer>().enabled = false;
            txt      = (TextMesh)transform.Find("Card Defesa").GetComponent("TextMesh");
            txt.text = defesa.ToString();
            txt.GetComponent <Renderer>().enabled = false;
            txt      = (TextMesh)transform.Find("Card Tipo").GetComponent("TextMesh");
            txt.text = properties.card_tipo;
            txt.GetComponent <Renderer>().enabled = false;
//			Renderer borda = (Renderer)transform.Find("borda").GetComponent("Renderer");
//			borda.GetComponent<Renderer>().enabled = false;
        }
        else if (cardPosition == POSITION.HAND)
        {
            player1 = bc;
            ataque  = properties.ataque;
            defesa  = properties.defesa;
//			Renderer borda = (Renderer)transform.Find("borda").GetComponent("Renderer");
//			borda.GetComponent<Renderer>().enabled = true;
            SpriteRenderer img = (SpriteRenderer)transform.Find("Card Picture").GetComponent("SpriteRenderer");
            img.enabled = true;
            img.sprite  = properties.card_image;
            TextMesh txt = (TextMesh)transform.Find("Card Name").GetComponent("TextMesh");
            txt.text = properties.card_name;
            txt.GetComponent <Renderer>().enabled = true;
            txt      = (TextMesh)transform.Find("Card Description").GetComponent("TextMesh");
            txt.text = properties.card_description.ToString();
            txt.GetComponent <Renderer>().enabled = true;
            txt      = (TextMesh)transform.Find("Card Command").GetComponent("TextMesh");
            txt.text = properties.comando.ToString();
            txt.GetComponent <Renderer>().enabled = true;
            txt      = (TextMesh)transform.Find("Card Ataque").GetComponent("TextMesh");
            txt.text = ataque.ToString();
            txt.GetComponent <Renderer>().enabled = true;
            txt      = (TextMesh)transform.Find("Card Defesa").GetComponent("TextMesh");
            txt.text = defesa.ToString();
            txt.GetComponent <Renderer>().enabled = true;
            txt      = (TextMesh)transform.Find("Card Tipo").GetComponent("TextMesh");
            txt.text = properties.card_tipo;
            txt.GetComponent <Renderer>().enabled = true;
        }
    }