コード例 #1
0
    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;
    }
コード例 #2
0
 private void Awake()
 {
     if (!Instance)
     {
         Instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
コード例 #3
0
        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;
        }
コード例 #4
0
    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);
    }
コード例 #5
0
ファイル: RewardScreen.cs プロジェクト: llcoolj411/2dRPGDev
 // Use this for initialization
 void Start()
 {
     instance = this;
 }
コード例 #6
0
 private void Awake()
 {
     Instance = this;
 }