Example #1
0
 public MessageComponent(KaroGame game, string message, string enterMessage, ACommonComponent enterComponent)
     : this(game)
 {
     Message = message;
     EnterMessage = enterMessage;
     EnterComponent = enterComponent;
 }
Example #2
0
        public ConnectComponent(KaroGame game)
            : base(game)
        {
            _inputField = new ConnectInputField(game, new Vector2(100, 100), "Host: ");

            Game.Components.Add(_inputField);
        }
Example #3
0
        public MenuComponent(KaroGame game)
            : base(game)
        {
            this.game = game;

            LoadContent();
        }
Example #4
0
 public MessageComponent(KaroGame game)
     : base(game)
 {
     Message = "";
     _oldState = Keyboard.GetState();
     lockTime = 1;
 }
Example #5
0
 public KaroGameManager()
 {
     Game = new KaroGame();
     MoveLog = new List<KeyValuePair<MoveWrapper, Players>>();
     Debug.WriteLine("Init Board State: {0}", Board.ToString());
     CurrentState = PlaceState.Instance;
 }
Example #6
0
        public ConnectInputField(KaroGame game, Vector2 position, string prefix)
            : base(game)
        {
            _position = position;
            _prefix = prefix;
            _connectionString = "";

            Port = -1;
        }
Example #7
0
 public Board(KaroGame game)
     : base(game)
 {
     MarkedCache = new Dictionary<Vector2, bool>();
     _lastMoveHighlight = new Vector2DWrapper[2];
     this.Position = new Vector3((SIZE + GAP) * 2f, 0f, (SIZE + GAP) * 1.5f);
     game.KaroGameManager.OnMoveExecuted += OnMoveExecuted;
     game.KaroGameManager.OnInvalidMoveMade += OnInvalidMove;
     _highlightThread = new Thread(RemoveHighlightAfterOneSecond);
     _game = game;
     LoadContent();
 }
Example #8
0
        public CameraComponent(KaroGame game, Vector3 targetPosition)
            : base(game)
        {
            Viewport viewport = game.GraphicsDevice.Viewport;
            _targetPosition = targetPosition;

            _yaw = -MathHelper.ToRadians(45);
            _pitch = -MathHelper.ToRadians(45);
            _zoom = 8f;

            _nearPlane = 1f;
            _farPlane = 400f;
        }
Example #9
0
        public BeachBallComponent(KaroGame game)
            : base(game)
        {
            float aspectRatio = Game.GraphicsDevice.Viewport.AspectRatio;
            _cameraPosition = new Vector3(20f, 0f, 0f);
            _view = Matrix.CreateLookAt(_cameraPosition, _position, Vector3.Up);
            _projection = Matrix.CreatePerspectiveFieldOfView(
                MathHelper.ToRadians(45f),
                aspectRatio, 0.1f, 25f
            );

            _offset = new Vector3(0f, -5f, 0f);
            _loading = false;
        }
 public CommunicationProtocolConversionUtility(KaroGame game)
 {
     _game = game;
 }
Example #11
0
 public SkyBoxComponent(KaroGame game)
     : base(game)
 {
 }
Example #12
0
 public ACommonComponent(KaroGame game)
     : base(game)
 {
     karoGame = game;
     // TODO:  Construct any child components here
 }