PlayerTurn¶
This method processes any controlled flow during the player phase when applicable to the currently selected player.
actedthisturn
is set to true- If currentaction is
BaseAction
(the main vine action menu):- SetMaxOptions is called
- ItemList's
inlist
is set to false - For each
playerdata
:- If the actor isn't IsStopped, its battleentity.
overrideanim
is set to false - If battleentity.animstate is 24 (
Block
), UpdateAnim is called and theplayerdata
loop exited. NOTE: it means not all player party member might have theiroverrideanim
set to false when not stopped, but in practice, this doesn't impact anything negatively under normal gameplay
- If the actor isn't IsStopped, its battleentity.
- If
choicevine
doesn't exist, it is created via CreateVine:choicevine
is created as a new GameObject namedVine
vineicons
is created as new array of lengthmaxoptions
vinebase
is created as a new GameObject namedBase
childed tochoicevine
- Each
vineicons
elements is initialised as the SpriteRenderer of a new instance ofPrefabs/Objects/Vine
childed to thevinebase
(each element causes thechoicevine
angles to be decreased by (0.0, 360 /maxoptions
floored, 0.0)):- position of
choicevine
position + (0.0, 0.0, -1.6) - angles of (-180, 275.0, 0.0)
- scale of (2.5, 2.5, 2.5)
- sprite of
guisprites[35 + i]
where i is the option index - with flipX
- position of
- The
choicevine
gets childed to thebattlemap
- The
choicevine
position is set toplayerdata[currentturn].battleentity
position + (0.0, 10.0, 0.0) - If
turncooldown
expired, GetChoiceInput is called which handles the player UI