public void SetPlayerMonsterType(DataType.MonsterType monster)
    {
        playerMonsterType = monster;
        isMonsterSelected = true;

        // Save changes to save data
        SaveGame();
    }
 void InitializeFromLoad(GameSave save)
 {
     print("Initializing entries from save file");
     gameStats           = save.gameStats;
     stickerStats        = save.stickerStats;
     visitedAreas        = save.visitedAreas;
     lastGamePlayed      = save.lastGamePlayed;
     isMonsterSelected   = save.isMonsterSelected;
     playerMonsterType   = save.playerMonsterType;
     numOfGamesCompleted = save.numOfGamesCompleted;
     isIntroShown        = save.isIntroShown;
 }
    private void Start()
    {
        if (!cardSpawn)
        {
            cardSpawn = cardHand.transform;
        }

        typeOfMonster = GameManager.Instance.GetPlayerMonsterType();

        // Initialize emotion lists according to monster type
        switch (typeOfMonster)
        {
        case DataType.MonsterType.Blue:
            PopulateList(primaryEmotions, blueEmotionsData);
            PopulateList(secondaryEmotions, greenEmotionsData);
            PopulateList(secondaryEmotions, redEmotionsData);
            PopulateList(secondaryEmotions, yellowEmotionsData);
            break;

        case DataType.MonsterType.Green:
            PopulateList(primaryEmotions, greenEmotionsData);
            PopulateList(secondaryEmotions, blueEmotionsData);
            PopulateList(secondaryEmotions, redEmotionsData);
            PopulateList(secondaryEmotions, yellowEmotionsData);
            break;

        case DataType.MonsterType.Red:
            PopulateList(primaryEmotions, redEmotionsData);
            PopulateList(secondaryEmotions, blueEmotionsData);
            PopulateList(secondaryEmotions, greenEmotionsData);
            PopulateList(secondaryEmotions, yellowEmotionsData);
            break;

        case DataType.MonsterType.Yellow:
            PopulateList(primaryEmotions, yellowEmotionsData);
            PopulateList(secondaryEmotions, blueEmotionsData);
            PopulateList(secondaryEmotions, greenEmotionsData);
            PopulateList(secondaryEmotions, redEmotionsData);
            break;
        }

        poolEmotions.Clear();
        poolEmotions.AddRange(primaryEmotions);
    }
    public GameObject GetMonsterObject(DataType.MonsterType typeOfMonster)
    {
        switch (typeOfMonster)
        {
        case DataType.MonsterType.Blue:
            return(blueMonster);

        case DataType.MonsterType.Green:
            return(greenMonster);

        case DataType.MonsterType.Red:
            return(redMonster);

        case DataType.MonsterType.Yellow:
            return(yellowMonster);

        default:
            return(blueMonster);
        }
    }
Exemplo n.º 5
0
 public Monster SpawnMonster(DataType.MonsterType monsterType, Transform spot)
 {
     spawnPosition = spot;
     return(SpawnMonster(GameManager.Instance.GetMonsterObject(monsterType), spawnPosition));
 }
Exemplo n.º 6
0
 public Monster SpawnMonster(DataType.MonsterType monsterType)
 {
     return(SpawnMonster(GameManager.Instance.GetMonsterObject(monsterType), spawnPosition));
 }
Exemplo n.º 7
0
 void Awake()
 {
     typeOfMonster = GameManager.Instance.GetPlayerMonsterType();
     animComp      = GetComponent <Animator> ();
 }
 public void CreateMonster(DataType.MonsterType typeOfMonster, Transform pos)
 {
     monsterCreator = gameObject.AddComponent <CreateMonster> ();
     playerMonster  = monsterCreator.SpawnMonster(typeOfMonster, pos);
 }