예제 #1
0
    private static void RefreshTTL(string id)
    {
        var ttl = MultiplayerStatic.GetTTLById(id);

        if (ttl == -1)
        {
            return;
        }
        TTLDictionary[id] = TTL;
    }
예제 #2
0
    private static int ReduceTTL(string id)
    {
        var ttl = MultiplayerStatic.GetTTLById(id);

        if (ttl == -1)
        {
            return(-1);
        }
        ttl -= 1;
        if (ttl < 0)
        {
            ttl = 0;
        }
        TTLDictionary[id] = ttl;
        return(ttl);
    }