Commit 3c1094d6 by alsunj

Upload New File

parent 4700a571
Showing with 39 additions and 0 deletions
using System.Collections;
using System.Collections.Generic;
using System.Linq.Expressions;
using UnityEngine;
public class CardScript : MonoBehaviour
{
public GameObject Card1;
public GameObject Card2;
public int value = 0;
public int GetValueOfCard()
{
return value;
}
public void SetValue(int newValue)
{
value = newValue;
}
public string GetSpriteName()
{
return GetComponent<SpriteRenderer>().sprite.name;
}
public void SetSprite(Sprite newSprite)
{
gameObject.GetComponent<SpriteRenderer>().sprite = newSprite;
}
public void ResetCard()
{
Sprite back = GameObject.Find("Deck").GetComponent<DeckScript>().GetCardBack();
gameObject.GetComponent<SpriteRenderer>().sprite = back;
value = 0;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment