UpdateText¶
This methods updates various textual information via SetText in non dialogue mode.
All SetText calls in this method have the following parameters on top of being in non dialogue mode:
- fonttype of 0 (
BubblegumSans
) - linebreak of 9999.0
- No tridimensional
- position of (0.0, -0.1, 0.0)
- No cameraoffset
- size of (0.85, 0.7)
- parent of
actiontext
- No caller
Chompy¶
This section applies only if the currentaction is Chompy
:
actiontext
local position is set to (-5.0, 4.0, 10.0)- All SetText objects under
actiontext
are destroyed via MainManager.DestroyText - A
menutext
id is determined depending oncoption[option]
(the selected chompy menu option): - SetText is called in non dialogue mode using the
menutext
line selected earlier prepanded with|
center|
During the player phase of a controlled flow¶
This section applies if the chompy one didn't and enemy
, action
and inevent
are false while the message lock is released:
cancelb
¶
If cancelb
doesn't exist, it is created as a new GameObject named cancelhelp
with a ButtonSprite component added to it and its SetUp called on it. That SetUp call receives:
- buttonid 5 (cancel)
- description of
menutext[43]
(Cancel
) (prepanded with|
size,1,1.5|
if the languageid isJapanese
) - position of Vector3.zero
- iconsize of (0.5, 0.5, 0.5)
- sortingOrder of 1
- parentobj
GUICamera
After the creation, a DelayCancelBox coroutine is started which yields a frame followed by creating a new UI object named back
childed to cancelb
with a position of (2.25, 0.
0, 0.0), a size of (1.1, 2.75, 1.0) using guisprites[0]
(a rectangle) and with a sortingOrder of -10. The SpriteRenderer color of this object is set to pure white with half opacity.
If the currentaction is BaseAction
(the vine main action menu), cancelb
position is set offscreen to (0.0, 999.0, 0.0). Otherwise, the local position is set to (2.1 or 2.5 if longcancel
is true, 4.2, 10.0).
currentaction logic¶
This section depends on the currentaction
BaseAction
¶
actiontext
local position is set to (-5.0, -4.0, 10.0)- All SetText objects under
actiontext
are destroyed via MainManager.DestroyText - A string is built staring with
|
center|
followed by amenutext
line that depends onoption
:- 0: 60 (
Attack
) - 1: 61 (
Skills
) - 2: 62 (
Items
) - 3: 63 (
Strategies
) - 4: 64 (
Turn Relay
)
- 0: 60 (
- Further parts can be appended to the string if
currentturn
isn't negative (there is a player selected for an action):option
is 0 and theAntlionJaws
medal on theplayerdata[currentturn].trueid
:|
size,1,0.6||
icon,183|
is appendedoption
is 1 and theStatusBoost
medal on theplayerdata[currentturn].trueid
:|
size,1,0.6||
icon,220|
is appendedoption
is 2 and theHealPlus
medal on theplayerdata[currentturn].trueid
:|
size,1,0.6||
icon,218|
is appendedoption
is 2 and theItemRecycle
medal on theplayerdata[currentturn].trueid
:|
size,1,0.6||
icon,227|
is appendedoption
is 4 and theRelayTransfer
medal on theplayerdata[currentturn].trueid
:|
size,1,0.6||
icon,216|
is appended
- A SetText call is done in non dialogue mode using the text obtained
SelectEnemy
¶
actiontext
local position is set to (-5.0, -2.5, 10.0)- All SetText objects under
actiontext
are destroyed via MainManager.DestroyText - A string is built depending on the itemarea, but it always starts with
|
center|
:SingleEnemy
:- If the languageid is
Japanese
or theavailabletargets[option].entityname
(the selected enemy's name) has a length of 5 or above,|
size,X,0.7|
is appended whereX
is 1.0 - 0.05 *availabletargets[option].entityname.length
- 5 clamped from 0.5 to 0.8 avaliabletargets[option].entityname
is appended- If currentchoice is
Strategy
while the bestiary entry of theavaliabletargets[option].animid
enemy id exists (the selected enemy id),|
stars,1|
is appended
- If the languageid is
All
:menutext[77]
is appendedAllEnemies
:menutext[75]
is appendedAllParty
:menutext[76]
is appended
- A SetText call is done in non dialogue mode using the text obtained
SelectPlayer
¶
actiontext
local position is set to (-5.0, -2.5, 10.0)- All SetText objects under
actiontext
are destroyed via MainManager.DestroyText - A string is built depending on the itemarea, but it always starts with
|
center|
:SingleAlly
:playerdata[option].entityname
is appended- If currentchoice is
Item
while theWeakStomach
medal is equipped onplayerdata[option].trueid
,|
size,1,0.6||
icon,184|
is appended
All
:menutext[77]
is appendedAllEnemies
:menutext[75]
is appendedAllParty
:menutext[76]
is appended
- A SetText call is done in non dialogue mode using the text obtained
SkillList
/ ItemList
/ StrategyList
¶
actiontext
local position is set to offscreen at (0.0, 999.0. 0.0)
Any other times¶
This section happens when neither of the other 2 did.
The only things that happens is the actiontext
and cancelb
local position are moved offscreen at (0.0, 999.0, 0.0).