void Start()
 {
     ProgramStateController.viewState();
     StartCoroutine(APIController.GetAssignmentQuesAPI());
     //StartCoroutine(GetQuesAPI());
     resultCanvas.gameObject.SetActive(false);
     UpdateBG(worldArr[UnityEngine.Random.Range(0, worldArr.Length)]);
     enemy.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Animations/assignmentMonster");
     if (character.Equals("Warrior"))
     {
         player.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Animation/RedWarrior");
     }
     else if (character.Equals("Magician"))
     {
         player.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Animation/Magician");
     }
     else if (character.Equals("Bowman"))
     {
         player.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Animation/Bowman");
     }
     else if (character.Equals("Swordman"))
     {
         player.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Animation/Swordman");
     }
 }
    void Start()
    {
        pv = GetComponent <PhotonView>();
        Debug.Log(FriendRoomController.player1char + " " + FriendRoomController.player2char);
        ProgramStateController.viewState();
        StartCoroutine(APIController.GetFriendStoryModeQuesAPI());
        if (FriendRoomController.playerID == 2)
        {
            initializeCharacter();
        }
        initializeHP();
        resultCanvas.gameObject.SetActive(false);
        waitingpanel.gameObject.SetActive(false);
        UpdateBG(world);

        player1matric.text = FriendRoomController.player1matric;
        player2matric.text = FriendRoomController.player2matric;
    }
예제 #3
0
    void Start()
    {
        ProgramStateController.viewState();
        StartCoroutine(APIController.GetStoryModeQuesAPI());
        //StartCoroutine(GetQuesAPI());
        initializeCharacter();
        initializeHP();
        playerMaxHP = 20;
        enemyMaxHP  = 10;

        playerPerHealth = playerMaxHP / 5;
        enemyPerHealth  = enemyMaxHP / 5;

        playerHP = playerMaxHP;
        enemyHP  = enemyMaxHP;

        checkHealthAmount(playerhealthImages);
        checkHealthAmount(enemyhealthImages);

        UpdateHearts(playerhealthImages, true);
        UpdateHearts(enemyhealthImages, false);
        resultCanvas.gameObject.SetActive(false);
        UpdateBG(world);
        enemy.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Animations/" + world + "MonsterController/" + level + world + "Monst");
        if (character.Equals("Warrior"))
        {
            player.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Animation/RedWarrior");
        }
        else if (character.Equals("Magician"))
        {
            player.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Animation/Magician");
        }
        else if (character.Equals("Bowman"))
        {
            player.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Animation/Bowman");
        }
        else if (character.Equals("Swordman"))
        {
            player.runtimeAnimatorController = Resources.Load <RuntimeAnimatorController>("Animation/Swordman");
        }
    }