Exemplo n.º 1
0
 private void Update()
 {
     if (host.MyTurn && Active && Input.GetMouseButtonDown(0))
     {
         Cell cell = PublicStuff.GetCellOnMousePosition();
         if (cell != null && targetCells.Contains(cell))
         {
             skillUsed.Invoke();
             target = cell;
             Invoke("DoDamage", connectionDelay);
         }
         Active = false;
         host.ResetSkillsCells();
     }
 }
Exemplo n.º 2
0
 private void Awake()
 {
     if (instance != null)
     {
         Debug.LogError("Tring to make more then one GM");
         Destroy(this);
     }
     else
     {
         instance = this;
         PublicStuff.SetGM(this);
     }
     if (!PublicStuff.Initilised)
     {
         PublicStuff.Initilize();
     }
 }
Exemplo n.º 3
0
 void FillTheHand()
 {
     for (int i = 0; i < Random.Range(4, 7); i++)
     {
         GameObject cardObj = Instantiate((GameObject)Resources.Load("Prefubs/Cards/EmptyCard"));
         Card       card    = cardObj.GetComponent <Card>();
         string     temp    = PublicStuff.Prephics[Random.Range(0, PublicStuff.Prephics.Count)] + " " + PublicStuff.Names[Random.Range(0, PublicStuff.Names.Count)];
         cardObj.name = temp;
         card.Initilise(temp, Random.Range(1, 10), Random.Range(1, 10), Random.Range(1, 10), PublicStuff.GetTexture());
         hand.AddCard(card);
     }
     readyToTest = true;
 }
Exemplo n.º 4
0
 private void Start()
 {
     PublicStuff.AddListenerToImagesLoaded(FillTheHand);
     StartCoroutine(PublicStuff.FillImageLibrary());
 }
Exemplo n.º 5
0
 private void Awake()
 {
     PublicStuff.SetHand(this);
 }