示例#1
0
 void OnTriggerEnter(Collider Target)
 {
     if (Target.tag == "Player")
     {
         IsPlayer = true;
         Transform mmCell = GridCreator.MiniMap[(int)(gameObject.transform.position.x / scaling), (int)(gameObject.transform.position.z / scaling)];
         mmCell.renderer.material.color = Color.red;
         if (mmCell.transform.position.x == GridCreator.GoalBlock.transform.position.x &&
             mmCell.transform.position.z == GridCreator.GoalBlock.transform.position.z)
         {
             GridCreator.MazeComplete();
         }
     }
 }