Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Tabu
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dennis Willers
Tabu
Commits
0dd589b5
Commit
0dd589b5
authored
Feb 15, 2021
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some Gamesound
parent
228fa59e
Pipeline
#389
passed with stages
in 5 minutes and 49 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
63 additions
and
8 deletions
+63
-8
game.component.ts
src/app/game/game.component.ts
+17
-0
overview.component.ts
src/app/overview/overview.component.ts
+13
-0
round-history.component.html
src/app/round-history/round-history.component.html
+8
-8
round-history.component.ts
src/app/round-history/round-history.component.ts
+25
-0
alert_error-01.ogg
src/assets/sounds/alert_error-01.ogg
+0
-0
hero_decorative-celebration-02.ogg
src/assets/sounds/hero_decorative-celebration-02.ogg
+0
-0
navigation_forward-selection-minimal.ogg
src/assets/sounds/navigation_forward-selection-minimal.ogg
+0
-0
navigation_selection-complete-celebration.ogg
...sets/sounds/navigation_selection-complete-celebration.ogg
+0
-0
navigation_transition-left.ogg
src/assets/sounds/navigation_transition-left.ogg
+0
-0
navigation_unavailable-selection.ogg
src/assets/sounds/navigation_unavailable-selection.ogg
+0
-0
state-change_confirm-up.ogg
src/assets/sounds/state-change_confirm-up.ogg
+0
-0
ui_refresh-feed.ogg
src/assets/sounds/ui_refresh-feed.ogg
+0
-0
ui_unlock.ogg
src/assets/sounds/ui_unlock.ogg
+0
-0
No files found.
src/app/game/game.component.ts
View file @
0dd589b5
...
...
@@ -113,6 +113,8 @@ export class GameComponent implements OnInit, OnDestroy {
if
(
!
JSON
.
parse
(
data
))
{
this
.
unsubscribeAll
();
this
.
router
.
navigate
([
this
.
sessionName
+
'
/
'
+
this
.
team
]);
const
audio
=
"
../../../assets/sounds/navigation_selection-complete-celebration.ogg
"
;
this
.
playAudio
(
audio
);
}
});
this
.
subCanPressTabooh
=
this
.
socketDataService
.
getCanPressTabooh
(
this
.
sessionName
)
...
...
@@ -154,10 +156,19 @@ export class GameComponent implements OnInit, OnDestroy {
this
.
newCard
();
this
.
gameStatus
.
red
=
JSON
.
parse
(
value
.
red
);
this
.
gameStatus
.
blue
=
JSON
.
parse
(
value
.
blue
);
const
audio
=
"
../../../assets/sounds/hero_decorative-celebration-02.ogg
"
;
this
.
playAudio
(
audio
);
}
});
}
playAudio
(
audioPath
:
string
):
void
{
const
audio
=
new
Audio
();
audio
.
src
=
audioPath
;
audio
.
load
();
audio
.
play
();
}
wrongAnswer
():
void
{
if
(
this
.
isExplainer
)
{
this
.
service
.
removePoint
...
...
@@ -173,6 +184,8 @@ export class GameComponent implements OnInit, OnDestroy {
this
.
newCard
();
this
.
gameStatus
.
red
=
JSON
.
parse
(
value
.
red
);
this
.
gameStatus
.
blue
=
JSON
.
parse
(
value
.
blue
);
const
audio
=
"
../../../assets/sounds/alert_error-01.ogg
"
;
this
.
playAudio
(
audio
);
}
});
}
else
if
(
this
.
isWatchdog
)
{
...
...
@@ -195,6 +208,8 @@ export class GameComponent implements OnInit, OnDestroy {
this
.
newCard
();
this
.
gameStatus
.
red
=
JSON
.
parse
(
value
.
red
);
this
.
gameStatus
.
blue
=
JSON
.
parse
(
value
.
blue
);
const
audio
=
"
../../../assets/sounds/alert_error-01.ogg
"
;
this
.
playAudio
(
audio
);
}
});
}
...
...
@@ -205,6 +220,8 @@ export class GameComponent implements OnInit, OnDestroy {
const
status
=
JSON
.
parse
(
value
.
status
);
if
(
status
)
{
this
.
newCard
();
const
audio
=
"
../../../assets/sounds/navigation_forward-selection-minimal.ogg
"
;
this
.
playAudio
(
audio
);
}
}).
catch
(
reason
=>
console
.
log
(
reason
));
}
...
...
src/app/overview/overview.component.ts
View file @
0dd589b5
...
...
@@ -165,11 +165,20 @@ export class OverviewComponent implements OnInit, OnDestroy {
const
status
=
JSON
.
parse
(
value
.
status
);
if
(
status
)
{
this
.
getGameStatus
();
const
audio
=
"
../../../assets/sounds/ui_refresh-feed.ogg
"
;
this
.
playAudio
(
audio
);
}
}).
catch
(
reason
=>
console
.
log
(
reason
));
}
}
playAudio
(
audioPath
:
string
):
void
{
const
audio
=
new
Audio
();
audio
.
src
=
audioPath
;
audio
.
load
();
audio
.
play
();
}
nextRound
():
void
{
this
.
unsubscribeAll
();
this
.
service
.
newRound
({
spielname
:
this
.
sessionName
}).
then
(
valueNotUsed
=>
{
...
...
@@ -178,6 +187,8 @@ export class OverviewComponent implements OnInit, OnDestroy {
this
.
isAllowedToPlay
.
role
=
'
explainer
'
;
this
.
router
.
navigate
([
this
.
sessionName
+
'
/
'
+
this
.
team
+
'
/explainer
'
,
]);
this
.
wantToBeExplainer
=
true
;
const
audio
=
"
../../../assets/sounds/state-change_confirm-up.ogg
"
;
this
.
playAudio
(
audio
);
});
});
}
...
...
@@ -190,6 +201,8 @@ export class OverviewComponent implements OnInit, OnDestroy {
this
.
canStartGame
();
this
.
unsubscribeAll
();
this
.
getSocketData
();
const
audio
=
"
../../../assets/sounds/ui_unlock.ogg
"
;
this
.
playAudio
(
audio
);
}
getGameStatus
():
void
{
...
...
src/app/round-history/round-history.component.html
View file @
0dd589b5
...
...
@@ -7,7 +7,7 @@
<!-- Answer Column -->
<ng-container
matColumnDef=
"answer"
>
<mat-cell
*matCellDef=
"let element"
>
<mat-cell
*matCellDef=
"let element"
(click)=
"tableClicked(element)"
>
<button
class=
"volleBreite"
*ngIf=
"element.answer === answer.zeitLaueft"
mat-raised-button
>
Zeit läuft
⏱
</button>
<button
class=
"volleBreite"
*ngIf=
"element.answer === answer.zeitAbgelaufen"
mat-raised-button
>
Zeit abgelaufen
⏱
</button>
<button
class=
"volleBreite"
*ngIf=
"element.answer === answer.richtig"
mat-raised-button
color=
"primary"
>
Richtig
✔
</button>
...
...
@@ -19,35 +19,35 @@
<!-- Solution Column -->
<ng-container
*ngIf=
"view === 'mobileView'"
matColumnDef=
"solution"
>
<mat-cell
*matCellDef=
"let element"
class=
"marginButtons"
>
<b
*ngIf=
"element.answer !== answer.zeitLaueft"
>
{{element.solution}}
</b></mat-cell>
<mat-cell
(click)=
"tableClicked(element)"
*matCellDef=
"let element"
class=
"marginButtons"
>
<b
*ngIf=
"element.answer !== answer.zeitLaueft"
>
{{element.solution}}
</b></mat-cell>
</ng-container>
<ng-container
*ngIf=
"view !== 'mobileView'"
matColumnDef=
"solution"
>
<mat-cell
*matCellDef=
"let element"
>
<b
*ngIf=
"element.answer !== answer.zeitLaueft"
>
{{element.solution}}
</b></mat-cell>
<mat-cell
(click)=
"tableClicked(element)"
*matCellDef=
"let element"
>
<b
*ngIf=
"element.answer !== answer.zeitLaueft"
>
{{element.solution}}
</b></mat-cell>
</ng-container>
<!-- Tabu1 Column -->
<ng-container
matColumnDef=
"tabu1"
>
<mat-cell
*matCellDef=
"let element"
>
<a
*ngIf=
"element.answer !== answer.zeitLaueft"
class=
"tabuColor"
>
{{element.tabu1}}
</a></mat-cell>
<mat-cell
(click)=
"tableClicked(element)"
*matCellDef=
"let element"
>
<a
*ngIf=
"element.answer !== answer.zeitLaueft"
class=
"tabuColor"
>
{{element.tabu1}}
</a></mat-cell>
</ng-container>
<!-- Tabu2 Column -->
<ng-container
matColumnDef=
"tabu2"
>
<mat-cell
*matCellDef=
"let element"
>
<a
*ngIf=
"element.answer !== answer.zeitLaueft"
class=
"tabuColor"
>
{{element.tabu2}}
</a></mat-cell>
<mat-cell
(click)=
"tableClicked(element)"
*matCellDef=
"let element"
>
<a
*ngIf=
"element.answer !== answer.zeitLaueft"
class=
"tabuColor"
>
{{element.tabu2}}
</a></mat-cell>
</ng-container>
<!-- Tabu3 Column -->
<ng-container
matColumnDef=
"tabu3"
>
<mat-cell
*matCellDef=
"let element"
>
<a
*ngIf=
"element.answer !== answer.zeitLaueft"
class=
"tabuColor"
>
{{element.tabu3}}
</a></mat-cell>
<mat-cell
(click)=
"tableClicked(element)"
*matCellDef=
"let element"
>
<a
*ngIf=
"element.answer !== answer.zeitLaueft"
class=
"tabuColor"
>
{{element.tabu3}}
</a></mat-cell>
</ng-container>
<!-- Tabu4 Column -->
<ng-container
matColumnDef=
"tabu4"
>
<mat-cell
*matCellDef=
"let element"
>
<a
*ngIf=
"element.answer !== answer.zeitLaueft"
class=
"tabuColor"
>
{{element.tabu4}}
</a></mat-cell>
<mat-cell
(click)=
"tableClicked(element)"
*matCellDef=
"let element"
>
<a
*ngIf=
"element.answer !== answer.zeitLaueft"
class=
"tabuColor"
>
{{element.tabu4}}
</a></mat-cell>
</ng-container>
<!-- Tabu5 Column -->
<ng-container
matColumnDef=
"tabu5"
>
<mat-cell
*matCellDef=
"let element"
>
<a
*ngIf=
"element.answer !== answer.zeitLaueft"
class=
"tabuColor"
>
{{element.tabu5}}
</a></mat-cell>
<mat-cell
(click)=
"tableClicked(element)"
*matCellDef=
"let element"
>
<a
*ngIf=
"element.answer !== answer.zeitLaueft"
class=
"tabuColor"
>
{{element.tabu5}}
</a></mat-cell>
</ng-container>
<!-- Expanded Content Column - The detail row is made up of this one column -->
...
...
src/app/round-history/round-history.component.ts
View file @
0dd589b5
...
...
@@ -167,8 +167,10 @@ export class RoundHistoryComponent extends DataSource<any> implements OnInit, On
this
.
roundHistory
[
s2cCard
].
answer
=
answer
;
let
cardResultID
=
0
;
let
point
=
0
;
let
audio
=
""
;
// Richtig Button selected
if
(
answer
===
Answer
.
richtig
)
{
audio
=
"
../../../assets/sounds/hero_decorative-celebration-02.ogg
"
;
cardResultID
=
2
;
if
(
oldAnswer
===
Answer
.
tabooh
)
{
point
=
2
;
...
...
@@ -178,6 +180,7 @@ export class RoundHistoryComponent extends DataSource<any> implements OnInit, On
}
// Ueberspringen or Zeit abgelaufen Button selected
if
(
answer
===
Answer
.
uebersprungen
||
answer
===
Answer
.
zeitAbgelaufen
)
{
audio
=
"
../../../assets/sounds/navigation_forward-selection-minimal.ogg
"
;
if
(
answer
===
Answer
.
zeitAbgelaufen
)
{
cardResultID
=
1
;
}
...
...
@@ -192,6 +195,7 @@ export class RoundHistoryComponent extends DataSource<any> implements OnInit, On
}
// Tabooh Button selected
if
(
answer
===
Answer
.
tabooh
)
{
audio
=
"
../../../assets/sounds/alert_error-01.ogg
"
;
cardResultID
=
4
;
if
(
oldAnswer
===
Answer
.
richtig
)
{
point
=
-
2
;
...
...
@@ -215,11 +219,32 @@ export class RoundHistoryComponent extends DataSource<any> implements OnInit, On
if
(
status
)
{
this
.
canUpdate
.
emit
(
true
);
this
.
gameStatus
.
emit
(
value
);
this
.
playAudio
(
audio
);
}
}).
catch
(
reason
=>
console
.
log
(
reason
)
);
}
playAudio
(
audioPath
:
string
):
void
{
const
audio
=
new
Audio
();
audio
.
src
=
audioPath
;
audio
.
load
();
audio
.
play
();
}
tableClicked
(
element
:
any
):
void
{
console
.
log
(
element
,
this
.
expandedElement
);
if
(
element
!==
this
.
expandedElement
)
{
let
audio
=
''
;
if
(
this
.
canEdit
)
{
audio
=
"
../../../assets/sounds/navigation_transition-left.ogg
"
;
}
else
{
audio
=
"
../../../assets/sounds/navigation_unavailable-selection.ogg
"
;
}
this
.
playAudio
(
audio
);
}
}
/** Connect function called by the table to retrieve one stream containing the data to render. */
connect
():
Observable
<
CardResultHistory
[]
>
{
const
rows
:
any
=
[];
...
...
src/assets/sounds/alert_error-01.ogg
0 → 100755
View file @
0dd589b5
File added
src/assets/sounds/hero_decorative-celebration-02.ogg
0 → 100755
View file @
0dd589b5
File added
src/assets/sounds/navigation_forward-selection-minimal.ogg
0 → 100755
View file @
0dd589b5
File added
src/assets/sounds/navigation_selection-complete-celebration.ogg
0 → 100755
View file @
0dd589b5
File added
src/assets/sounds/navigation_transition-left.ogg
0 → 100755
View file @
0dd589b5
File added
src/assets/sounds/navigation_unavailable-selection.ogg
0 → 100755
View file @
0dd589b5
File added
src/assets/sounds/state-change_confirm-up.ogg
0 → 100755
View file @
0dd589b5
File added
src/assets/sounds/ui_refresh-feed.ogg
0 → 100755
View file @
0dd589b5
File added
src/assets/sounds/ui_unlock.ogg
0 → 100755
View file @
0dd589b5
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment