Пример #1
0
    //4 6 8 10 12 / 5 10 kinetic
    //262 4 6 8 70 /5 270
    private void Awake()
    {
        StartingWall = transform.GetChild(0).gameObject;
        Logo         = transform.GetChild(1).gameObject;
        IngameTimer  = GetComponent <InGameTimer>();
        mainCam      = Camera.main.GetComponent <RTS_Cam.RTS_Camera>();

        if (!sysmsg)
        {
            sysmsg = GameObject.FindGameObjectWithTag("SystemMsg").GetComponent <SystemMessage>();
        }

        //이벤트 수신
        PhotonNetwork.OnEventCall += SceneLoaded_Received;

        //포지션 세팅
        for (int i = 0; i < 5; i++)
        {
            redPos.Add(new Vector3(4 + (i * 2), 0.5f, 10f));
        }
        for (int i = 0; i < 5; i++)
        {
            bluePos.Add(new Vector3(262 + (i * 2), 0.5f, 270f));
        }
    }
Пример #2
0
    private void OnLevelWasLoaded(int level)
    {
        if (SceneManager.GetSceneByBuildIndex(level).name.Equals("InGame"))
        {
            PhotonNetwork.OnEventCall += SpellEffectSync;

            cursor         = GameObject.FindGameObjectWithTag("MouseCursor").GetComponent <AOSMouseCursor>();
            Ping           = GameObject.FindGameObjectWithTag("PingPool").GetComponent <PingPooling>();
            cam            = Camera.main.GetComponent <RTS_Cam.RTS_Camera>();
            minimap        = GameObject.FindGameObjectWithTag("MinimapClick").GetComponent <MinimapClick>();
            chat           = GameObject.FindGameObjectWithTag("ChatManager").GetComponentInChildren <ChatFunction>();
            SpellContainer = GameObject.FindGameObjectWithTag("SpellPooling");
            makepool();
            isInGameScene = true;
        }
    }