예제 #1
0
    // Start is called before the first frame update
    void Start()
    {
        persistentSFXGameObject = GameObject.Find("PersistentSFX");
        persistentSFX           = persistentSFXGameObject.GetComponent <PersistentSFX>();

        audioForThisLevelContainer = GameObject.Find("MusicForThisLevel");
        audioForThisLevel          = audioForThisLevelContainer.GetComponent <AudioForThisLevel>();

        player       = GameObject.FindWithTag("Player");
        levelManager = GameObject.Find("LevelManager");

        fadeInTweenContainer = GameObject.FindWithTag("FadeInTweener");
        fadeInTweener        = fadeInTweenContainer.GetComponent <DOTweenVisualManager>();

        fadeOutTweenContainer = GameObject.FindWithTag("FadeOutTweener");
        fadeOutTweener        = fadeOutTweenContainer.GetComponent <DOTweenVisualManager>();

        fadeInTweener.enabled  = true;
        fadeOutTweener.enabled = false;

        _gameHandler = GameObject.FindWithTag("GameHandler");
        gameHandler  = _gameHandler.GetComponent <GameHandler>();

        audioForThisLevel.PlayMusicForThisLevel();
    }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        openEndScreenTweenContainer = GameObject.FindWithTag("EndScreenOpen");
        openEndScreenTweenManager   = openEndScreenTweenContainer.GetComponent <DOTweenVisualManager>();

        Invoke("EndDemo", 60);
    }
예제 #3
0
    void Start()
    {
        anim = gameObject.GetComponent <Animator>();

        dialogueManager = FindObjectOfType <DialogueManager>();

        openDialogueTweenContainer = GameObject.FindWithTag("DialogueOpen");
        openDialogue = openDialogueTweenContainer.GetComponent <DOTweenVisualManager>();

        closeDialogueTweenContainer = GameObject.FindWithTag("DialogueClose");
        closeDialogue = closeDialogueTweenContainer.GetComponent <DOTweenVisualManager>();

        conversing = false;
    }
예제 #4
0
    //private DialogueTrigger dialogueTrigger;

    void Start()
    {
        //dialogueTrigger = GameObject

        sentences = new Queue <string>();

        openDialogueTweenContainer = GameObject.FindWithTag("DialogueOpen");
        openDialogue = openDialogueTweenContainer.GetComponent <DOTweenVisualManager>();

        closeDialogueTweenContainer = GameObject.FindWithTag("DialogueClose");
        closeDialogue = closeDialogueTweenContainer.GetComponent <DOTweenVisualManager>();

        closeDialogue.enabled = true;
        closeDialogue.enabled = false;
    }
예제 #5
0
    public void Start()
    {
        frogBossDead            = false;
        persistentSFXGameObject = GameObject.Find("PersistentSFX");
        persistentSFX           = persistentSFXGameObject.GetComponent <PersistentSFX>();

        pauseMenuOn = false;
        hudOn       = false;

        pauseTweens = GameObject.Find("PauseMoveIn");
        hudTweens   = GameObject.Find("HUDMoveIn");

        pauseTweenManager = pauseTweens.GetComponent <DOTweenVisualManager>();
        hudTweenManager   = hudTweens.GetComponent <DOTweenVisualManager>();
    }
예제 #6
0
 private void OnEnable()
 {
     this._src = (base.target as DOTweenVisualManager);
     if (!Application.isPlaying)
     {
         MonoBehaviour[] components = ((Component)this._src).GetComponents <MonoBehaviour>();
         int             num        = ArrayUtility.IndexOf(components, this._src);
         int             num2       = 0;
         for (int i = 0; i < num; i++)
         {
             if (components[i] is ABSAnimationComponent)
             {
                 num2++;
             }
         }
         while (num2 > 0)
         {
             num2--;
             ComponentUtility.MoveComponentUp(this._src);
         }
     }
 }
예제 #7
0
    void RandomBird()
    {
        if (bird != null)
        {
            Destroy(bird);
        }
        int        index = UnityEngine.Random.Range(1, 4);
        GameObject randombird;

        switch (index)
        {
        case 1:
            randombird = Instantiate(Resources.Load <GameObject>("bird"));
            UIManager.instance.backGround.sprite = Resources.Load <Sprite>("bg_day");
            break;

        case 2:
            randombird = Instantiate(Resources.Load <GameObject>("redbird"));
            UIManager.instance.backGround.sprite = Resources.Load <Sprite>("bg_night");
            break;

        case 3:
            randombird = Instantiate(Resources.Load <GameObject>("bluebird"));
            UIManager.instance.backGround.sprite = Resources.Load <Sprite>("bg_day");
            break;

        default:
            randombird = Instantiate(Resources.Load <GameObject>("bird"));
            UIManager.instance.backGround.sprite = Resources.Load <Sprite>("bg_night");
            break;
        }
        randombird.transform.SetParent(birdParent);
        randombird.transform.localScale   *= 0.8f;
        randombird.transform.localPosition = Vector3.zero;
        bird    = randombird;
        manager = bird.GetComponent <DOTweenVisualManager>();
        randombird.transform.SetParent(this.transform);
    }
예제 #8
0
    void Awake()
    {
        videoPlayer = GetComponentInChildren <VideoPlayer>();

        fadeInTweenContainer = GameObject.FindWithTag("FadeInTweener");
        fadeInTweener        = fadeInTweenContainer.GetComponent <DOTweenVisualManager>();

        fadeOutTweenContainer = GameObject.FindWithTag("FadeOutTweener");
        fadeOutTweener        = fadeOutTweenContainer.GetComponent <DOTweenVisualManager>();


        fadeInTweener.enabled  = false;
        fadeOutTweener.enabled = false;

        audioForThisLevelContainer = GameObject.Find("MusicForThisLevel");
        audioForThisLevel          = audioForThisLevelContainer.GetComponent <AudioForThisLevel>();

        Invoke("FadeIntoCutscene", 0.5f);
        //Invoke("ResetFades", 2);

        cutscenesContainer = GameObject.FindWithTag("CutscenesContainer");
        _chaosSymbolVid    = cutscenesContainer.transform.Find("0-chaos-symbol-brain");
        chaosSymbolVid     = _chaosSymbolVid.gameObject;
    }
예제 #9
0
        private void OnEnable()
        {
            this._src = (base.target as DOTweenVisualManager);
            if (Application.isPlaying)
            {
                return;
            }
            MonoBehaviour[] components = this._src.GetComponents <MonoBehaviour>();
            int             num        = ArrayUtility.IndexOf <MonoBehaviour>(components, this._src);
            int             i          = 0;

            for (int j = 0; j < num; j++)
            {
                if (components[j] is ABSAnimationComponent)
                {
                    i++;
                }
            }
            while (i > 0)
            {
                i--;
                ComponentUtility.MoveComponentUp(this._src);
            }
        }
예제 #10
0
 private void Start()
 {
     tp = GetComponent <DOTweenVisualManager>();
 }
예제 #11
0
    public void Start()
    {
        _gameHandler = GameObject.FindWithTag("GameHandler");
        gameHandler  = _gameHandler.GetComponent <GameHandler>();

        _portalState = GameObject.FindWithTag("PortalHandler");
        portalState  = _portalState.GetComponent <PortalState>();

        persistentSFXGameObject = GameObject.Find("PersistentSFX");
        persistentSFX           = persistentSFXGameObject.GetComponent <PersistentSFX>();

        DOTween.Init();

        levelManager = GameObject.Find("LevelManager");

        fadeInTweenContainer = GameObject.FindWithTag("FadeInTweener");
        fadeInTweener        = fadeInTweenContainer.GetComponent <DOTweenVisualManager>();

        fadeOutTweenContainer = GameObject.FindWithTag("FadeOutTweener");
        fadeOutTweener        = fadeOutTweenContainer.GetComponent <DOTweenVisualManager>();

        hostileBrain = this.GetComponentInChildren <HostileBrain>();

        //healthMax = 100;

        containerHealth     = 20;
        enemyHealth         = 50;
        playerHealth        = 100;
        critterHealth       = 10;
        foliageHealth       = 15;
        frogBossHealth      = 100;
        chaosVillagerHealth = 30;

        respawnPos = new Vector3(0, 0, 0);

        if (this.tag == "Player")
        {
            health = playerHealth;

            //anim = gameObject.GetComponent<Animator>();
            anim = gameObject.GetComponentInChildren <Animator>();
            if (anim == null)
            {
                //anim = gameObject.GetComponentInChildren<Animator>();
                Debug.Log("Error: Did not find anim!");
            }
            else
            {
                //Debug.Log("Got anim");
            }
        }

        if (this.tag == "Foliage")
        {
            health = foliageHealth;
        }

        if (this.tag == "Enemy")
        {
            health = enemyHealth;

            anim = gameObject.GetComponent <Animator>();
            if (anim == null)
            {
                Debug.Log("Error: Did not find anim!");
            }
            else
            {
                //Debug.Log("Got anim");
            }
        }

        if (this.tag == "Container")
        {
            health = containerHealth;
        }

        if (this.tag == "Critter")
        {
            health = critterHealth;

            anim = gameObject.GetComponent <Animator>();
            if (anim == null)
            {
                Debug.Log("Error: Did not find anim!");
            }
            else
            {
                //Debug.Log("Got anim");
            }
        }

        if (this.tag == "FrogBoss")
        {
            health = frogBossHealth;

            animContainer = GameObject.Find("chaosFrog");
            anim          = animContainer.GetComponent <Animator>();

            if (anim == null)
            {
                Debug.Log("Error: Did not find anim!");
            }
            else
            {
                //Debug.Log("Got anim");
            }
        }

        if (this.tag == "ChaosVillager")
        {
            health = chaosVillagerHealth;

            anim = this.GetComponentInChildren <Animator>();

            if (anim == null)
            {
                Debug.Log("Error: Did not find anim!");
            }
            else
            {
                //Debug.Log("Got anim");
            }
        }
    }