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(); } }
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(); } }
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; }
private void Start() { PublicStuff.AddListenerToImagesLoaded(FillTheHand); StartCoroutine(PublicStuff.FillImageLibrary()); }
private void Awake() { PublicStuff.SetHand(this); }