Exemplo n.º 1
0
        public void Construct(
            Dispatcher dispatch,
            BoardActions actions
            )
        {
            dispatch(actions.AddCombatant(
                         prefabKey: "Isaac",
                         displayName: "Isaac",
                         cameraWeight: 1f,
                         position: new Vector3(10f, 1f, -3f),
                         health: 100
                         ));

            dispatch(actions.AddPawn(
                         prefabKey: "TestCylinder",
                         displayName: "TestEnemy1",
                         cameraWeight: 1f,
                         position: new Vector3(15f, 1f, -4f)
                         ));

            dispatch(actions.AddPawn(
                         prefabKey: "TestCylinder",
                         displayName: "TestEnemy1",
                         cameraWeight: 1f,
                         position: new Vector3(12f, 1f, -8f)
                         ));
        }
        public void RegisterBoardActions(
            Dispatcher dispatch,
            GetState getState,
            BoardActions actions
            )
        {
            DebugLogConsole.AddCommand(
                command: "AddPawn",
                description: "Adds a new Pawn to the Board",
                method: (string prefabKey, string displayName, float cameraWeight) => {
                dispatch(actions.AddPawn(prefabKey, displayName, cameraWeight, GetMousePosition()));
            }
                );

            DebugLogConsole.AddCommand(
                command: "AddCombatant",
                description: "Adds a Combatant Pawn to the Board",
                method: (string prefabKey, int health, string displayName, float cameraWeight) => {
                dispatch(actions.AddCombatant(prefabKey, health, displayName, cameraWeight, GetMousePosition()));
            }
                );

            DebugLogConsole.AddCommand(
                command: "RemovePawn",
                description: "Removes a pawn from the board",
                method: (string id) => { dispatch(actions.RemovePawn(Guid.Parse(id))); }
                );
        }
Exemplo n.º 3
0
 void Start()
 {
     gs      = GameObject.Find("GameState").GetComponent <GameState> ();
     sendBtn = GameObject.Find("SendButton");
     ba      = GameObject.Find("UIScripts").GetComponent <BoardActions> ();
     //tiles = GameObject.Find ("UIScripts").GetComponent<LoadBoard> ().allTiles;
 }
Exemplo n.º 4
0
    public void Initialize()
    {
        CreateTiles();
        BoardActions          = new BoardActions(tiles);
        BoardCombinations     = new BoardCombinations(tiles);
        BoardNewContentPlacer = new BoardNewContentPlacer(tiles, BoardCombinations);

        Initialized?.Invoke();
    }
Exemplo n.º 5
0
        public IActionResult Index(string boardDomain)
        {
            domain = boardDomain;
            Boards board = BoardActions.LoadBoard(boardDomain);

            board.Threads = board.Threads.OrderByDescending(x => x.lastBump).ToList();
            ViewBag.Board = board;
            return(View());
        }
Exemplo n.º 6
0
    void Start()
    {
        // TODO: agnostic assignation (not depend of name)
        boardActions = GameObject.Find(
            "BoardActions"
            ).GetComponent <BoardActions> ();

        gameObject.GetComponent <Button> ().onClick.AddListener(
            () => CheckPressedButton(CurrentColor)
            );
    }
Exemplo n.º 7
0
    // Use this for initialization
    void Awake()
    {
        ba = GameObject.Find("UIScripts").GetComponent <BoardActions> ();

        flagella1      = GameObject.Find("Flagella1");
        flagella2      = GameObject.Find("Flagella2");
        flagella3      = GameObject.Find("Flagella3");
        portal1        = GameObject.Find("Portal1");
        portal2        = GameObject.Find("Portal2");
        portal3        = GameObject.Find("Portal3");
        matrix1        = GameObject.Find("Matrix1");
        matrix2        = GameObject.Find("Matrix2");
        matrix3        = GameObject.Find("Matrix3");
        membraneRight1 = GameObject.Find("MembraneRight1");
        membraneRight2 = GameObject.Find("MembraneRight2");
        membraneRight3 = GameObject.Find("MembraneRight3");
        membraneLeft1  = GameObject.Find("MembraneLeft1");
        membraneLeft2  = GameObject.Find("MembraneLeft2");
        membraneLeft3  = GameObject.Find("MembraneLeft3");
        middleTile     = GameObject.Find("MiddleTile");
        //setUpBoard (3,11,4);
    }
 public IActionResult Index()
 {
     ViewBag.BoardsList = BoardActions.LoadBoardsList();
     return(View());
 }
Exemplo n.º 9
0
    // Use this for initialization
    void Awake()
    {
        ba = GameObject.Find ("UIScripts").GetComponent<BoardActions> ();

        flagella1 = GameObject.Find ("Flagella1");
        flagella2 = GameObject.Find ("Flagella2");
        flagella3 = GameObject.Find ("Flagella3");
        portal1 = GameObject.Find ("Portal1");
        portal2 = GameObject.Find ("Portal2");
        portal3 = GameObject.Find ("Portal3");
        matrix1 = GameObject.Find ("Matrix1");
        matrix2 = GameObject.Find ("Matrix2");
        matrix3 = GameObject.Find ("Matrix3");
        membraneRight1 = GameObject.Find ("MembraneRight1");
        membraneRight2 = GameObject.Find ("MembraneRight2");
        membraneRight3 = GameObject.Find ("MembraneRight3");
        membraneLeft1 = GameObject.Find ("MembraneLeft1");
        membraneLeft2 = GameObject.Find ("MembraneLeft2");
        membraneLeft3 = GameObject.Find ("MembraneLeft3");
        middleTile = GameObject.Find ("MiddleTile");
        //setUpBoard (3,11,4);
    }
Exemplo n.º 10
0
 void Start()
 {
     gs = GameObject.Find ("GameState").GetComponent<GameState> ();
     sendBtn = GameObject.Find ("SendButton");
     ba = GameObject.Find ("UIScripts").GetComponent<BoardActions> ();
     //tiles = GameObject.Find ("UIScripts").GetComponent<LoadBoard> ().allTiles;
 }
Exemplo n.º 11
0
 public IActionResult ReplyToThread(string message, int threadId, string image = null)
 {
     BoardActions.ReplyToThread(message, threadId, image);
     return(RedirectToAction("Index", new { boardDomain = domain }));
 }
Exemplo n.º 12
0
 public IActionResult CreateThread(string message, int boardId, string image = null)
 {
     BoardActions.CreateThread(message, boardId, image);
     return(RedirectToAction("Index", new { boardDomain = domain }));
 }
Exemplo n.º 13
0
 public IActionResult ReplyToThread(string message, int threadId, string image = null)
 {
     BoardActions.ReplyToThread(message, threadId, image);
     return(RedirectToAction("Index", new { threadMainPostId = threadMPId }));
 }
Exemplo n.º 14
0
 public IActionResult Index(int threadMainPostId)
 {
     threadMPId     = threadMainPostId;
     ViewBag.Thread = BoardActions.LoadThread(threadMainPostId);
     return(View());
 }