Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System.Collections.Generic;
- using System.Linq;
- public class TesteA : MonoBehaviour {
- public List<ItemClass> List = new List<ItemClass>();
- public List<int> numbers = new List<int>();
- string VerificarNumeros () {
- for (int i = 0; i < List.Count; i++)
- if (List[i].nList.Intersect(numbers).ToList().Count == numbers.Count)
- return "sequencia encontrada no index " + i;
- return "sequencia não econtrada";
- }
- void Start() { print(VerificarNumeros()); }
- }
- [System.Serializable]
- public class ItemClass
- {
- public int Item;
- public string Date;
- public List<int> nList = new List<int>();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement