PlayerTurn¶
This method processes any controlled flow during the player phase when applicable to the currently selected player.
actedthisturnis set to true- If currentaction is
BaseAction(the main vine action menu):- SetMaxOptions is called
- ItemList's
inlistis set to false - For each
playerdata:- If the actor isn't IsStopped, its battleentity.
overrideanimis set to false - If battleentity.animstate is 24 (
Block), UpdateAnim is called and theplayerdataloop exited. NOTE: it means not all player party member might have theiroverrideanimset 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
choicevinedoesn't exist, it is created via CreateVine:choicevineis created as a new GameObject namedVinevineiconsis created as new array of lengthmaxoptionsvinebaseis created as a new GameObject namedBasechilded tochoicevine- Each
vineiconselements is initialised as the SpriteRenderer of a new instance ofPrefabs/Objects/Vinechilded to thevinebase(each element causes thechoicevineangles to be decreased by (0.0, 360 /maxoptionsfloored, 0.0)):- position of
choicevineposition + (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
choicevinegets childed to thebattlemap
- The
choicevineposition is set toplayerdata[currentturn].battleentityposition + (0.0, 10.0, 0.0) - If
turncooldownexpired, GetChoiceInput is called which handles the player UI