Exemplo n.º 1
0
    IEnumerator NextImageCoroutine()
    {
        yield return(new WaitForSeconds(nextImageTime));

        if (nextObject != null)
        {
            nextObject.SetActive(true);             //.StartImage ();
            ImageFader img = nextObject.GetComponent <ImageFader> ();
            if (img != null)
            {
                img.StartImage();
            }
        }
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     gameManager = FindObjectOfType <GameManager>();
     if (gameManager == null)
     {
         Print("No AudioManager found!", "error");
     }
     audioManager = FindObjectOfType <AudioManager>();
     if (audioManager == null)
     {
         Print("No AudioManager found!", "error");
     }
     if (gameManager.currentState != GameManager.State.Menu)
     {
         imgFad = FindObjectOfType <ImageFader>();
         if (imgFad == null)
         {
             Print("No ImageFader found!", "error");
         }
     }
 }
    void Start()
    {
        gamePaused             = false;
        imageFader             = GetComponent <ImageFader>();
        imageFader.OnFullFade += PlayClip;

        players[0] = GameObject.Find("Player");
        players[1] = GameObject.Find("Player2Test");
        //players[1] = GameObject.Find("TestDummy");


        GetPlayerMaxHealth();
        SetPlayersSpawn();
        RoundCountdown();

        players[0].GetComponent <RageMode>().OnRageCutsceneStart += PlayRageCutscene;
        players[1].GetComponent <RageMode>().OnRageCutsceneStart += PlayRageCutscene;

        //test only:
        //player1feet = players[0].GetComponent<CircleCollider2D>();
        //player2feet = players[1].GetComponent<CircleCollider2D>();
        //Physics2D.IgnoreCollision(player1feet, player2feet);
    }
Exemplo n.º 4
0
 void Awake()
 {
     black = GameObject.Find("Black").GetComponent <ImageFader> ();
 }
Exemplo n.º 5
0
 private void Awake()
 {
     Network.GameServer.OnFatalError = this.ShowErrorDialog;
     this.ImageFader = this.GetComponent <ImageFader>();
 }