Пример #1
0
    void Init()
    {
        timeLineManager = gameObject.GetComponent <TimeLineManager>();
        string characterfile = File.ReadAllText(Application.dataPath + "/Data/characters.json");

        characterInfoCollection = JsonUtility.FromJson <CharacterInfoCollection>(characterfile);
        string includefile = File.ReadAllText(Application.dataPath + "/Data/characters-include.json");

        characterIncludeCollection = JsonUtility.FromJson <CharacterIncludeCollection>(includefile);
        foreach (CharacterInclude include in characterIncludeCollection.include)
        {
            includeDictionary.Add(include.name, include.include);
        }


        // ---------------
        foreach (CharacterInfo info in characterInfoCollection.characters)
        {
            if (includeDictionary.ContainsKey(info.characterName) && includeDictionary[info.characterName])
            {
                if (!characterSet.Contains(info.characterName))
                {
                    characterSet.Add(info.characterName);
                    //meta data
                    // characterDataBase.characterNameList.Add(info.characterName);
                    characterDataBase.characterInfoList.Add(info);
                    // if (!characterDataBase.houseList.Contains(info.houseName) && info.houseName != "" && info.houseName != null)
                    // {
                    //     characterDataBase.houseList.Add(info.houseName);
                    // }
                }
            }
        }
    }
Пример #2
0
    public void KillEnemy(bool killed)
    {
        if (enemyType == EnemyTypes.DUMMY)
        {
            GameObject aux = Instantiate(destroyedDummy, transform.position, transform.rotation);
            Destroy(aux, 2.2f);
            if (dummyCount == 0)
            {
                GameObject.Find("RecargarHint").GetComponent <Animator>().SetInteger("AxesLeft", 1);
            }
            if (dummyCount > 0)
            {
                TimeLineManager.PlayTutorial(1);
                dummyCount--;
            }

            /*else if (dummyCount == 1)
             * {
             *  TimeLineManager.PlayTutorial(1);
             *  MobSpawning.mobSp.pUpCanvas.SetActive(true);
             *  dummyCount--;
             *  GameObject.Find("PowerUpCanvas").GetComponent<GraphicRaycaster>().enabled = true;
             *  GameObject.Find("GameCanvas").GetComponent<GraphicRaycaster>().enabled = false;
             * }*/
            else
            {
                TimeLineManager.PlayTutorial(2);
                gameObject.SetActive(false);
                Camera.main.GetComponent <CameraScript>().StartLvlVoid(1, 12f);
            }
            hp = maxHP;
            //HPBarImage.fillAmount = HPBarImage2.fillAmount = hp / maxHP;
            return;
        }
        enemiesAlive--;
        if (enemiesAlive <= 0 && MobSpawning.enemiesRem <= 0)
        {
            MobSpawning.mobSp.StartWaveRemote();
        }
        //Debug.Log(enemiesAlive + "alive - " + MobSpawning.enemiesRem + "remaining");
        if (killed == false)
        {
            CameraShaker.Instance.ShakeOnce(2f, 5f, .1f, .5f);
            //ThrowingController.currentHealth -= 20;
            //GameObject.Find("GameCanvas").GetComponent<ThrowingController>().ActualizeHealth();
            GameManager.currentHealth -= 20;
            GameObject.Find("GameCanvas").GetComponent <GameManager> ().ActualizeHealth();
        }
        else
        {
            int pointsEarned = 250 + (int)ComboTextLogic.combo * 10;
            MobSpawning.score += pointsEarned;
            PowerUpsCanvasController.INSTANCE.ActualizeMana(pointsEarned);
            waveNum.text = MobSpawning.score.ToString();
            DATA.instance.score_enemiesKilledTotal++;
        }
        gameObject.SetActive(false);
    }
Пример #3
0
 void Awake()
 {
     if (timeLineManager == null)
     {
         timeLineManager = this;
     }
     dir = GetComponent <PlayableDirector>();
     PlayTutorial(0);
 }
Пример #4
0
 public void destroyDummy()
 {
     spawnAuxDummy();
     if (amountDummy == 0)
     {
         animRecharge.SetInteger("AxesLeft", 1);
     }
     if (amountDummy > 0)
     {
         TimeLineManager.PlayTutorial(1);
         amountDummy--;
     }
     else
     {
         TimeLineManager.PlayTutorial(2);
         gameObject.SetActive(false);
         Camera.main.GetComponent <CameraScript> ().StartLvlVoid(1, 12f);
     }
     gameObject.SetActive(false);
 }
Пример #5
0
 private void Awake()
 {
     Instance = this;
 }
Пример #6
0
 private void Awake()
 {
     Instance     = this;
     uSkyTimeline = FindObjectOfType <usky.uSkyTimeline>();
 }
 public TimeLineController()
 {
     dbManager   = new DbManager();
     workManager = new TimeLineManager(dbManager);
 }