Example #1
0
    private void Awake()
    {
        ss = this;

        WallTile = Resources.Load("02prefab/tile001", typeof(GameObject)) as GameObject;
        BackTile = Resources.Load("02prefab/tile002", typeof(GameObject)) as GameObject;
        BM       = FindObjectOfType <Blockmanager>();

        SetDefault();   // 맵 기본상태로 설정

        SetCameraPos(); // 카메라를 맵이 전부 보이게 변경
    }
 void InitGame()
 {
     //initialise game map
     mapManager = GetComponent <mapmanager>();
     mapManager.InitMap();
     //initialise UI
     foodtext         = GameObject.Find("food").GetComponent <Text>();
     failtext         = GameObject.Find("failed").GetComponent <Text>();
     failtext.enabled = false;
     updatefoodtext(0);
     player       = GameObject.FindGameObjectWithTag("Player").GetComponent <p1>();
     day          = GameObject.Find("day").GetComponent <Image>();
     daytext      = GameObject.Find("daytext").GetComponent <Text>();
     daytext.text = "Day " + level;
     Invoke("hideblack", 2);
     //initialise parametre
     win = false;
     cpulist.Clear();
 }
Example #3
0
 public void Awake()
 {
     mapmanref = GetComponent <mapmanager>();
 }