Пример #1
0
 void Awake()
 {
     StoryPage = 1;
     StopTime  = GameObject.Find("TimeManager").GetComponent <TimeManager>();
     Community = GameObject.Find("CommuManager").GetComponent <CommuManager>();
     Tuto      = GameObject.Find("TutorialManager").GetComponent <TutorialManager>();
 }
Пример #2
0
    /* void Awake()
     * {
     *   if (DataManager.isLoaded) SpawnTerm = DataManager.SaveSpawnTime;
     *   else SpawnTerm = 30f;
     *
     *   UpPrice = 1;
     *   commuManager = GameObject.Find("CommuManager").GetComponent<CommuManager>();
     *   CustomerNameLabel = SpeechBubble.GetComponentsInChildren<UILabel>()[0];
     *   CustomerOrderLabel = SpeechBubble.GetComponentsInChildren<UILabel>()[1];
     *   //SpawnPoint = GameObject.Find("CustomerSpawnPoint").transform;
     *
     *   Customers = new List<GameObject>();
     *   CustomersPos = new Vector3[4] { new Vector3(2f, 0f, -1f), new Vector3(4f, 0f, -1f), new Vector3(6f, 0f, -1f), new Vector3(8f, 0f, -1f) };
     *
     *   Length = DataManager.SpawnCus;
     *   BossSpawn = DataManager.SaveSpawnBoss;
     *
     *   SpawnCount = 0;
     *   //StartCoroutine("SpawnCustomer");
     * }*/
    //-데이터로드-------------------------------------
    public void DataAccess(DataVo dataVo)
    {
        SpawnTerm = float.Parse(dataVo.SaveSpawnTime);
        Length    = int.Parse(dataVo.SpawnCus);
        BossSpawn = bool.Parse(dataVo.SaveSpawnBoss);

        UpPrice            = 1;
        lastCus2           = 0;
        commuManager       = GameObject.Find("CommuManager").GetComponent <CommuManager>();
        CustomerNameLabel  = SpeechBubble.GetComponentsInChildren <UILabel>()[0];
        CustomerOrderLabel = SpeechBubble.GetComponentsInChildren <UILabel>()[1];

        Customers    = new List <GameObject>();
        CustomersPos = new Vector3[4] {
            new Vector3(2f, 0f, -1f), new Vector3(4f, 0f, -1f), new Vector3(6f, 0f, -1f), new Vector3(8f, 0f, -1f)
        };
        SpawnCount = 0;
        StartCoroutine("SpawnCustomer");
    }