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))); }
                );
        }