public void Start() { spelplan = GameObject.Find("Spelplan"); characterAnimations = GameObject.Find("PlayerMary").GetComponent <CharacterAnimations>(); enemyAnimations = GameObject.Find("PlayerEnemy").GetComponent <EnemyAnimations>(); rewardScreen = GameObject.Find("PController").GetComponent <RewardScreen>(); lastMove = GameObject.Find("PController").GetComponent <LastMove>(); hellStaff = GameObject.Find("PController").GetComponent <HellStaff>(); darknightStaff = GameObject.Find("PController").GetComponent <DarkNightStaff>(); moonStaff = GameObject.Find("PController").GetComponent <MoonStaff>(); skeletonStaff = GameObject.Find("PController").GetComponent <SkeletonStaff>(); pumpkinStaff = GameObject.Find("PController").GetComponent <PumpkinStaff>(); mirrorStaff = GameObject.Find("PController").GetComponent <MirrorStaff>(); playerTurn = 0; marysHealth = marysMaxHealth; enemyHealth = enemyMaxHealth; firstTurn = true; Marks(playerMarks, enemyMarks); pumpkinStaff.PumpkinStaffPassiveAbility(); lastMove.staffUsed = true; }
private void Awake() { if (!Instance) { Instance = this; } else { Destroy(gameObject); } }
public void GenerateRewards(int noOfRewardCards) { rewardCards = new List <KeyValuePair <string, Card> >(); Random rnd = new Random(); for (int i = 0; i < noOfRewardCards; i++) { int index = rnd.Next(4, cardCollection.allCards.Count() - 1); while (rewardCards.Contains(cardCollection.allCards.ElementAt(index))) { index = rnd.Next(4, cardCollection.allCards.Count() - 1); } rewardCards.Add(cardCollection.allCards.ElementAt(index)); } rewardScreen = new RewardScreen(rewardCards, Player.FullPlayerDeck, ScreenContent, ui); this.ScreenContent.Content = rewardScreen; }
private void HandelRewardState() { if (rewardScreen == null) { Debug.Log(screens[stateManager.CurrentState]); rewardScreen = (RewardScreen)screens[states[3]]; } if (rewardScreen == null) { Debug.LogWarning("RewardScreen is not where it needs to be"); return; } rewardScreen.SetVisable(true); wallL.SetActive(false); wallR.SetActive(false); bridge.SetActive(true); bridgeWall.SetActive(true); }
// Use this for initialization void Start() { instance = this; }
private void Awake() { Instance = this; }