Example #1
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Example #2
0
    // METHODS
    void Awake()
    {
        Instance = this;
        IniciarMusica();
        BaseDatos.Instance.CrearJugadorEnemigo();
        timer = GetComponent <RopeTimer>();
        controladorJugador = ControladorJugador.Instance;
        controladorEnte    = ControladorEnte.Instance;
        Recursos.CartasCreadasEnElJuego.Clear();

        //INICIALIZAR CONTROLS PLAYER,ENTE
    }
Example #3
0
    public void CleanUp()
    {
        sellers = new List <NetworkPlayer>();

        Items           = new List <Transform>();
        rt              = GetComponent <RopeTimer>();
        hitBuyIt        = false;
        playerInfoSpots = new List <PlayerInfoView>();

        foreach (Transform child in PlayerPanel.transform)
        {
            Destroy(child.gameObject);
        }

        carousel.cleanupCarousel();

        chooseItemsAnnouncement.SetActive(false);
    }
    public void setupPlayItemsScene()
    {
        PlayItemsEvent thisRound;
        GameManager    gm = GameManager.Instance;

        if (gm.currentEvent().type != TimelineEventType.PlayItems)
        {
            Debug.LogError("In PlayItemsManager but current event type is " + gm.currentEvent().type);
            return;
        }
        else
        {
            thisRound = gm.currentEvent() as PlayItemsEvent;
        }

        // Start the timer.
        RopeTimer timerScript = TimerContainer.GetComponent <RopeTimer>();

        timerScript.SetTimer(duration: (float)thisRound.duration);
        timerScript.StartTimer();
    }
 // METHODS
 void Awake()
 {
     Instance = this;
     timer    = GetComponent <RopeTimer>();
 }
Example #6
0
 void Awake()
 {
     Players  = GameObject.FindObjectsOfType <Player>();
     Instance = this;
     _timer   = GetComponent <RopeTimer>();
 }