Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
spnati
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPNATI Utilities Bot
spnati
Commits
e2ce5985
Commit
e2ce5985
authored
6 years ago
by
FarawayVision
Browse files
Options
Downloads
Patches
Plain Diff
turn off debug mode
parent
bb2dc20e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/spniCore.js
+19
-19
19 additions, 19 deletions
js/spniCore.js
with
19 additions
and
19 deletions
js/spniCore.js
+
19
−
19
View file @
e2ce5985
...
...
@@ -8,7 +8,7 @@
**********************************************************************/
/* General Constants */
var
DEBUG
=
tru
e
;
var
DEBUG
=
fals
e
;
var
BASE_FONT_SIZE
=
14
;
var
BASE_SCREEN_WIDTH
=
100
;
...
...
@@ -138,13 +138,13 @@ function createNewPlayer (folder, first, last, label, gender, size, intelligence
},
};
initPlayerState
(
newPlayerObject
);
return
newPlayerObject
;
}
/*******************************************************************
* (Re)Initialize the player properties that change during a game
* (Re)Initialize the player properties that change during a game
*******************************************************************/
function
initPlayerState
(
player
)
{
player
.
out
=
player
.
finished
=
player
.
exposed
=
false
;
...
...
@@ -169,11 +169,11 @@ function initialSetup () {
/* start by creating the human player object */
var
humanPlayer
=
createNewPlayer
(
""
,
""
,
""
,
""
,
eGender
.
MALE
,
eSize
.
MEDIUM
,
eIntelligence
.
AVERAGE
,
20
,
[],
null
);
players
[
HUMAN_PLAYER
]
=
humanPlayer
;
/* enable table opacity */
tableOpacity
=
1
;
$gameTable
.
css
({
opacity
:
1
});
/* load the all content */
loadTitleScreen
();
selectTitleCandy
();
...
...
@@ -192,7 +192,7 @@ function loadConfigFile () {
type
:
"
GET
"
,
url
:
"
config.xml
"
,
dataType
:
"
text
"
,
success
:
function
(
xml
)
{
success
:
function
(
xml
)
{
var
_debug
=
$
(
xml
).
find
(
'
debug
'
).
text
();
if
(
_debug
===
"
true
"
)
{
...
...
@@ -221,7 +221,7 @@ function screenTransition (first, second) {
first
.
hide
();
second
.
show
();
}
/************************************************************
* Switches to the next screen based on the screen provided.
************************************************************/
...
...
@@ -268,22 +268,22 @@ function resetPlayers () {
************************************************************/
function
restartGame
()
{
KEYBINDINGS_ENABLED
=
false
;
resetPlayers
();
/* enable table opacity */
tableOpacity
=
1
;
$gameTable
.
css
({
opacity
:
1
});
$gamePlayerClothingArea
.
show
();
$gamePlayerCardArea
.
show
();
/* trigger screen refreshes */
updateSelectionVisuals
();
updateAllGameVisuals
();
selectTitleCandy
();
forceTableVisibility
(
true
);
/* there is only one call to this right now */
$epilogueSelectionModal
.
hide
();
$gameScreen
.
hide
();
...
...
@@ -294,7 +294,7 @@ function restartGame () {
/**********************************************************************
***** Interaction Functions *****
**********************************************************************/
/************************************************************
* The player clicked the credits button. Shows the credits modal.
************************************************************/
...
...
@@ -347,15 +347,15 @@ function getRandomNumber (min, max) {
/**********************************************************************
* Returns the width of the visible screen in pixels.
**/
function
getScreenWidth
()
function
getScreenWidth
()
{
/* fetch all game screens */
var
screens
=
document
.
getElementsByClassName
(
'
screen
'
);
/* figure out which screen is visible */
for
(
var
i
=
0
;
i
<
screens
.
length
;
i
++
)
for
(
var
i
=
0
;
i
<
screens
.
length
;
i
++
)
{
if
(
screens
[
i
].
offsetWidth
>
0
)
if
(
screens
[
i
].
offsetWidth
>
0
)
{
/* this screen is currently visible */
return
screens
[
i
].
offsetWidth
;
...
...
@@ -366,12 +366,12 @@ function getScreenWidth ()
/**********************************************************************
* Automatically adjusts the size of all font based on screen width.
**/
function
autoResizeFont
()
function
autoResizeFont
()
{
/* resize font */
var
screenWidth
=
getScreenWidth
();
document
.
body
.
style
.
fontSize
=
(
14
*
(
screenWidth
/
1000
))
+
'
px
'
;
/* set up future resizing */
window
.
onresize
=
autoResizeFont
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment