Exemplo n.º 1
0
    void Start()
    {
        if (respawnCountInput == null ||
            timeLimitInput == null ||
            Global.GameSetting().modeSelected == null)
        {
            Debug.LogError("Missing component!");
            return;
        }

        m_ModeDef = Global.GameSetting().modeDeathMatch;
        if (m_ModeDef == null)
        {
            Debug.LogError("Mode does not match!");
            return;
        }

        respawnCountInput.onSubmit.Add(new EventDelegate(() => m_ModeDef.respawnCount = int.Parse(respawnCountInput.value)));
        timeLimitInput.onSubmit.Add(new EventDelegate(() => m_ModeDef.timeLimit       = int.Parse(timeLimitInput.value)));

        Refresh();
    }
    void Start()
    {
        if (respawnCountInput == null
            || timeLimitInput == null
            || Global.GameSetting().modeSelected == null)
        {
            Debug.LogError("Missing component!");
            return;
        }

        m_ModeDef = Global.GameSetting().modeDeathMatch;
        if (m_ModeDef == null)
        {
            Debug.LogError("Mode does not match!");
            return;
        }

        respawnCountInput.onSubmit.Add(new EventDelegate(() =>  m_ModeDef.respawnCount = int.Parse(respawnCountInput.value)));
        timeLimitInput.onSubmit.Add(new EventDelegate( () => m_ModeDef.timeLimit = int.Parse(timeLimitInput.value)));

        Refresh();
    }