예제 #1
0
        static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            //DeveloperTestController controller = new DeveloperTestController(new DeveloperTest());
            //Application.Run(controller.view);
            //Application.Run(new Initialize());

            //TempTestController controller = new TempTestController(new TempTest());
            //Application.Run(controller.view);
            //Application.Run(new Initialize());
            // Set the unhandled exception mode to force all Windows Forms errors to go through
            // our handler.
            Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);

            InitializeController initializecontroller = new InitializeController(new Initialize());

            Application.Run(initializecontroller.view);
        }
예제 #2
0
        // Start is called before the first frame update
        void Start()
        {
            initializeController = new InitializeController(player, house, list, sack);

            Cursor.lockState = CursorLockMode.Locked;
            Cursor.visible   = false;

            timerText = GameObject.Find("Timer").GetComponent <Text>();
            timer     = 179;

            RunGame = true;

            crosshair = Resources.Load <Texture2D>("UI/Retical");
            //crosshair.Resize(crosshair.width * 20, crosshair.height * 20);
            //crosshair.Apply();

            endGame.Find("Button").GetComponent <Button>().onClick.AddListener(delegate { SceneManager.LoadScene("Menu"); });
            endGame.gameObject.SetActive(false);

            References.initializeView = this;
        }
예제 #3
0
    // Use this for initialization
    void Start()
    {
        timeManager          = this.GetComponent <TimeManager>();
        initializeController = this.GetComponent <InitializeController>();
        scaleManager         = this.GetComponent <ScaleManager>();
        resignController     = this.GetComponent <ResignController>();

        activeCamera = player1Camera;

        _gameState
        .Subscribe(state =>
        {
            _disposables.Clear();
            print(state);
            GameStateChanged(state);
        })
        .AddTo(this);

        _playerTurn
        .Subscribe(turn =>
        {
            if (turn == 1)
            {
                player1Camera.SetActive(true);
                player2Camera.SetActive(false);

                activeCamera = player1Camera;
            }
            else if (turn == 2)
            {
                player1Camera.SetActive(false);
                player2Camera.SetActive(true);

                activeCamera = player2Camera;
            }
        })
        .AddTo(this);
    }
예제 #4
0
 // Start is called before the first frame update
 void Start()
 {
     initializeController = new InitializeController();
 }