public void DecreaseVision(TileView t) { if (gameObject.transform.Find("Player") != true) { t.GetComponentInChildren <SpriteRenderer>().sprite = God.SM.black; } }
public void CheckIfPlayer(TileView t) { if (t.transform.Find("Player")) { t.playerDuration = playerTrail; t.GetComponentInChildren <Animator>().enabled = false; } else if (!t.transform.Find("Monster") || !t.transform.Find("RedKey") || !t.transform.Find("ScoreThing")) { t.GetComponentInChildren <Animator>().enabled = false; } if (t.playerDuration > 0 && !t.transform.Find("Player")) { t.GetComponentInChildren <SpriteRenderer>().sprite = God.SM.grey; } }
public TileView SpawnTile(TileModel t) { TileView r = Instantiate(TileP).GetComponent <TileView>(); r.GetComponentInChildren <SpriteRenderer>().sprite = God.SM.black; r.Setup(t); return(r); }
public TileView SpawnTile(TileModel t) { TileView r = Instantiate(TileP).GetComponent <TileView>(); r.GetComponentInChildren <SpriteRenderer>().sprite = God.GSM.black; //r.GetComponentInChildren<SpriteRenderer>().color = new Color32(255, 255, 255, 0); r.Setup(t); return(r); }
public void IncreaseVision(TileView t) { if (gameObject.transform.Find("Player") != true) { //Debug.Log("KILL"); t.GetComponentInChildren <SpriteRenderer>().sprite = God.GSM.black; //Debug.Log(gameObject.transform.localPosition); } //if(t.Model.Neighbor(1,1).View.transform.Find(t.Model.Neighbor(1,1).View.name) == true) { // Debug.Log("Monster Nearby"); //} }
public void CheckIfPlayer(TileView t) { if (t.transform.Find("Player")) { t.PlayerWasHere = true; //t.GetComponentInChildren<SpriteRenderer>().sprite = God.GSM.grey; } else if (!t.transform.Find("Skeleton") || !t.transform.Find("RedKey") || !t.transform.Find("ScoreThing")) { t.GetComponentInChildren <Animator>().enabled = false; //a.Model.View.transform.GetComponentInParent<TileView>().GetComponentInChildren<Animator>().enabled = true; } if (t.transform.Find("Player")) { t.GetComponentInChildren <Animator>().enabled = false; } if (t.PlayerWasHere && !t.transform.Find("Player")) { //t.GetComponentInChildren<Animator>().enabled = false; t.GetComponentInChildren <SpriteRenderer>().sprite = God.GSM.grey; } }