Пример #1
0
    public void InitObject()
    {
        //초기화 Appmanager 에서 모두 각각의 오브젝트를 초기화시킨다.
        appManager = AppManager.GetInstance();

        mainCamera = appManager.mainCamera;

        loginCanvas = appManager.loginCanvas;

        deployShipCanvas = appManager.deployShipCanvas;

        findingGameCanvas = appManager.findingGameCanvas;

        playCanvas = appManager.playCanvas;

        playEndCanvas = appManager.playEndCanvas;

        myTiles = appManager.tileManager.GetComponent <DeployTile>().tiles;

        bombStorage = appManager.deployer.GetComponent <DeployBomb>().Armory.GetComponent <MakeBomb>().bombStorage;

        shipDock = appManager.deployer.transform.Find("Harbor").gameObject.GetComponent <MakeShip>().ShipDock;;

        hitTile = appManager.deployer.GetComponent <MakeTile>().tileStorage;

        normalTile = appManager.deployer.GetComponent <MakeTile>().tileStorageNormal;

        networkManager = NetworkManager.GetInstance();
        httpNet        = networkManager.httpNetwork;
        tcpNet         = networkManager.tcpipNetwork;

        AddNetworkEvent();
    }
Пример #2
0
    public void InitObject()
    {
        //초기화 Appmanager 에서 모두 각각의 오브젝트를 초기화시킨다.
        appManager = AppManager.GetInstance();

        mainCamera = appManager.mainCamera;

        loginCanvas = appManager.loginCanvas;

        deployShipCanvas = appManager.deployShipCanvas;

        gameStartButtonText = appManager.gameStartButtontext;

        findingGameCanvas = appManager.findingGameCanvas;

        cancleButtontext = appManager.cancleButtontext;

        playCanvas = appManager.playCanvas;

        playEndCanvas = appManager.playEndCanvas;

        myTiles = appManager.tileManager.GetComponent <DeployTile>().tiles;
        //Debug.Log("tilenum" + appManager.tileManager.GetComponent<DeployTile>().tiles.Length);
        shipDock = appManager.deployer.transform.Find("Harbor").gameObject.GetComponent <MakeShip>().ShipDock;;

        networkManager = NetworkManager.GetInstance();
        httpNet        = networkManager.httpNetwork;
        tcpNet         = networkManager.tcpipNetwork;
        shipDeplyInfo  = "";

        AddNetworkEvent();
    }
Пример #3
0
        public static UpdateResult CheckForUpdates(string url, int major, int minor, int build)
        {
            string text = HTTPLib.getPage(url);

            if (text.Length == 0)
            {
                return(UpdateResult.CouldNotLoadPage);
            }

            text = text.Replace("\r", "").Replace("\n", "").Replace(" ", "").Replace("\t", "");
            string[] vs = text.Split(new char[] { '.' });
            if (vs.Length != 3)
            {
                return(UpdateResult.InvalidData);
            }

            // comparison code
            int serverMajor = Int32.Parse(vs[0]);
            int serverMinor = Int32.Parse(vs[1]);
            int serverBuild = Int32.Parse(vs[2]);

            if ((serverMajor > major) ||
                ((serverMajor == major) && (serverMinor > minor)) ||
                ((serverMajor == major) && (serverMinor == minor) && (serverBuild > build)))
            {
                return(UpdateResult.NewVersionAvailable);
            }
            else
            {
                return(UpdateResult.UpToDate);
            }
        }
Пример #4
0
    public void InitObject()
    {
        //초기화 Appmanager 에서 모두 각각의 오브젝트를 초기화시킨다.
        appManager = AppManager.GetInstance();

        mainCamera = appManager.mainCamera;

        loginCanvas = appManager.loginCanvas;

        deployShipCanvas = appManager.deployShipCanvas;

        findingGameCanvas = appManager.findingGameCanvas;

        playCanvas = appManager.playCanvas;

        playEndCanvas = appManager.playEndCanvas;

        deployer       = appManager.deployer;;
        harbor         = appManager.deployer.transform.Find("Harbor").gameObject;
        armory         = appManager.deployer.transform.Find("Armory").gameObject;
        tileManager    = appManager.tileManager;
        networkManager = NetworkManager.GetInstance();
        httpNet        = networkManager.httpNetwork;
        tcpNet         = networkManager.tcpipNetwork;
    }
Пример #5
0
    public void InitObject()
    {
        //초기화 Appmanager 에서 모두 각각의 오브젝트를 초기화시킨다.
        appManager = AppManager.GetInstance();

        mainCamera = appManager.mainCamera;

        loginCanvas = appManager.loginCanvas;

        deployShipCanvas = appManager.deployShipCanvas;

        findingGameCanvas = appManager.findingGameCanvas;

        playCanvas = appManager.playCanvas;

        playEndCanvas = appManager.playEndCanvas;

        networkManager = NetworkManager.GetInstance();
        httpNet        = networkManager.httpNetwork;
        tcpNet         = networkManager.tcpipNetwork;

        AddNetworkEvent();
    }
Пример #6
0
 // Use this for initialization
 void Start()
 {
     httpNet        = NetworkManager.GetInstance().httpNetwork;
     tcpNet         = NetworkManager.GetInstance().tcpipNetwork;
     NetworkManager = NetworkManager.GetInstance();
 }