Exemple #1
0
 public void DecreaseVision(TileView t)
 {
     if (gameObject.transform.Find("Player") != true)
     {
         t.GetComponentInChildren <SpriteRenderer>().sprite = God.SM.black;
     }
 }
Exemple #2
0
    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;
        }
    }
Exemple #3
0
    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);
    }
Exemple #5
0
 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");
     //}
 }
Exemple #6
0
    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;
        }
    }