예제 #1
0
    public void thign()
    {
        tunnelCreator = GetComponent <TunnelCreator>();
        tunnelCreator.CreateSineTunnel();
        player = playerGO.GetComponent <Player>();

        playerGO.transform.position = new Vector2(4, tunnelCreator.length + 50);
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        // Check if instance already exists
        if (instance == null)
        {
            // if not, set instance to this
            instance = this;
        }
        // If instance already exists and it's not this:
        else if (instance != this)
        {
            // Then destroy this
            Destroy(gameObject);
        }

        tunnelCreator = GetComponent <TunnelCreator>();
        tunnelCreator.CreateSineTunnel();
        player = playerGO.GetComponent <Player>();

        playerGO.transform.position = new Vector2(4, tunnelCreator.length + 50);
    }
예제 #3
0
        public void Initiate()
        {
            _tunnelCreators = new List <ITunnelCreator>();
            foreach (var localport in _localPorts)
            {
                //IProtocolClient sshConnector;

                if (_currentProtocol == AvailableProtocols.Ssh)
                {
                    var sshConnector = new SshConnector(
                        new CredentialSsh()
                    {
                        Host = _foreignHost, Port = _protocolPort, User = _user, Password = _password
                    },
                        null);
                    ITunnelCreator tunnelCreator = new TunnelCreator(sshConnector
                                                                     , _localhost, localport, _foreignHost, _foreignPort);
                    _tunnelCreators.Add(tunnelCreator);
                }
            }

            _initiated = true;
        }
예제 #4
0
    // ------------------------------------------------------------------------ //

    // Use this for initialization
    void Start()
    {
        this.tool_gui = this.GetComponent <ToolGUI>();

        // カメラのインスタンスを探しておく.
        this.main_camera = GameObject.FindGameObjectWithTag("MainCamera");

        this.tool_camera = this.main_camera.GetComponent <ToolCameraControl>();
        this.game_camera = this.main_camera.GetComponent <GameCameraControl>();
        this.car_camera  = this.main_camera.GetComponent <CarCamera>();

        this.tool_camera.enabled = true;
        this.game_camera.enabled = false;
        this.car_camera.enabled  = false;

        this.game_control = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameControl>();
        this.game_control.tool_control = this;

        //

        this.line_drawer      = (Instantiate(this.LineDrawerPrefab) as GameObject).GetComponent <LineDrawerControl>();
        this.line_drawer.root = this;

        this.waku_object = GameObject.Find("waku");

        //

        this.road_creator       = new RoadCreator();
        this.tunnel_creator     = new TunnelCreator();
        this.forest_creator     = new ForestCreator();
        this.buil_arranger      = new BuildingArranger();
        this.jump_slope_creator = new JumpSlopeCreator();

        this.junction_finder = new JunctionFinder();

        this.tunnel_creator.TunnelPrefab = this.TunnelPrefab;
        this.tunnel_creator.road_creator = this.road_creator;
        this.tunnel_creator.main_camera  = this.main_camera;
        this.tunnel_creator.tool_gui     = this.tool_gui;
        this.tunnel_creator.create();

        this.forest_creator.TreePrefab   = this.TreePrefab;
        this.forest_creator.road_creator = this.road_creator;
        this.forest_creator.main_camera  = this.main_camera;
        this.forest_creator.tool_gui     = this.tool_gui;
        this.forest_creator.create();

        this.buil_arranger.BuildingPrefabs = this.BuildingPrefabs;
        this.buil_arranger.road_creator    = this.road_creator;
        this.buil_arranger.main_camera     = this.main_camera;
        this.buil_arranger.tool_gui        = this.tool_gui;
        this.buil_arranger.create();

        this.jump_slope_creator.JumpSlopePrefab = this.JumpSlopePrefab;
        this.jump_slope_creator.road_creator    = this.road_creator;
        this.jump_slope_creator.main_camera     = this.main_camera;
        this.jump_slope_creator.tool_gui        = this.tool_gui;
        this.jump_slope_creator.create();

        this.junction_finder.create();

        //

        this.game_camera.road_creator = this.road_creator;

        this.step = STEP.EDIT;
    }