private void OnTriggerEnter2D(Collider2D collision) { if (collision.transform.tag == "SnakeHead") { ColorMapCreater.GetTheInstance().CreateNewMap(); } }
private void Awake() { tPos = new Vector3(200, 0, 0); theInstance = this; GetRandomNum(); nowMap = Instantiate(partMaps[tnum], tPos, transform.rotation); tPos.x += 200f; GetRandomNum(); nextMap = Instantiate(partMaps[tnum], tPos, transform.rotation); tPos.x += 200f; }