// Use this for initialization protected void Start() { pasos = 0; status = Agent_Status.SLEEPING; cuchilloFound = false; fiambreFound = false; casoResuelto = false; mapa = GameManager.instance.mapa; infoMapa = new TILE_INFO[mapa.altoMapa, mapa.anchoMapa]; frontera = new List <Vector2Int>(); posCasa = new Vector2Int(0, 0); for (int i = 0; i < mapa.altoMapa; i++) { for (int j = 0; j < mapa.anchoMapa; j++) { TILE_INFO aux; aux.probCuerpo = aux.probPrecipicio = 0; aux._Contenido = Tile.T_Contenido.C_DESCONOCIDO; aux._Terreno = Tile.T_Terreno.T_DESCONOCIDO; aux.frontera = false; aux.noPrecipicio = false; aux.noCuerpo = false; infoMapa [i, j] = aux; } } Color color = new Color(Random.Range(.0f, 1.0f), Random.Range(.0f, 1.0f), Random.Range(.0f, 1.0f)); GetComponent <SpriteRenderer>().color = color; updatePos(); mapa.getTile(pos.y, pos.x).SetDescubierta(true); }
// Update is called once per frame protected void Update() { if (status == Agent_Status.SLEEPING) { status = Agent_Status.EXPLORING; GameManager.instance.ActualizarInfo("Explorando"); Invoke("Explore", 0.5f); } }
// Use this for initialization protected void Start() { status = Agent_Status.SLEEPING; cuchilloFound = false; fiambreFound = false; casoResuelto = false; mapa = GetComponentInParent <Mapa>(); updatePos(); mapa.getTile(pos.y, pos.x).SetDescubierta(true); }