Antura  1.1.0
Antura.Profile.PlayerProfile Class Reference

A Player Profile contains persistent data on details and on the progression status of a single player. More...

Public Member Functions

int GetTotalNumberOfBones ()
 
int AddBones (int _bonesToAdd)
 
int RemoveBones (int _bonesToRemove)
 
void Save ()
 Saves this instance. More...
 
void SetCurrentJourneyPosition (int _stage, int _lb, int _ps, bool _save=true)
 Sets the actual journey position and save to profile. More...
 
void SetCurrentJourneyPosition (JourneyPosition _journeyPosition, bool _save=true, bool _updatePrevToo=true)
 Sets the actual journey position and save to profile. More...
 
void AdvanceMaxJourneyPosition ()
 Advance the Max journey position based on the next after the Current one. More...
 
void SetMaxJourneyPosition (JourneyPosition newJourneyPosition, bool _save=true)
 Sets the maximum journey position and save to profile. More...
 
void CheckGameFinished ()
 Check whether the game has finished and update the player icon. Called only when we actually finish the game. More...
 
void CheckStarsState ()
 Check whether the game has finished with all starts and update the player icon. Called at each end of play session. More...
 
void ResetMaxJourneyPosition (bool _save=true)
 Resets the maximum journey position to 1,1,1. More...
 
bool IsAtMaxJourneyPosition ()
 checks if we are at the max joiurney position More...
 
void AdvanceCurrentStage ()
 
void RetractCurrentStage ()
 
bool IsAssessmentTime ()
 
void ForcePreviousJourneyPosition (JourneyPosition journeyPosition)
 
void ResetRewardsUnlockedData ()
 Resets the rewards unlocked data. More...
 
List< RewardPackUnlockDataLoadRewardsUnlockedFromDB ()
 Loads the rewards unlocked from database. More...
 
int GetNotYetUnlockedRewardCountForType (RewardTypes _rewardType)
 Gets the not yet unlocked rewards list. More...
 
bool RewardForTypeAvailableYet (RewardTypes _rewardType)
 Return true if rewards for this type available. More...
 
bool ThereIsSomeNewReward ()
 True if there is at least one new reward for this player. More...
 
bool RewardColorIsNew (string _itemId, string _colorId)
 
bool RewardItemIsNew (string _itemId)
 Return true if Reward is never used by player. More...
 
bool RewardCategoryContainsNewElements (RewardTypes _rewardType, string _rewardCategory="")
 Return true if Reward category container at least one reward never used by player. More...
 
void SetRewardPackUnlockedToNotNew (string _rewardPackId)
 Mark RewardPackUnlockData as not new and update db entry. More...
 
void AddRewardUnlocked (RewardPackUnlockData rewardPackUnlockData)
 Adds or update the reward unlocked and persist it. More...
 
void AddRewardUnlockedAll (RewardPackUnlockData _rewardPackUnlockData)
 Add update to db all 'this' reward unlocked. More...
 
void AddRewardUnlockedRange (List< RewardPackUnlockData > rewardPackUnlockDatas)
 Adds or update a list of unlocked rewards and persist it. More...
 
void SaveCustomization (AnturaCustomization _anturaCustomization=null)
 Saves the customization on db. More...
 
bool IsFirstContact ()
 Determines whether [is first contact]. More...
 
bool IsFirstContact (int _step)
 Determines whether [is first contact] whit [the specified step] (1 or 2). More...
 
void FirstContactPassed (int _step=1)
 Set firsts contact flag as passed for step specified. More...
 
void ResetPlayerProfileCompletion ()
 Resets the player profile completion. More...
 
bool IsBookVisited ()
 Determines whether [is first time book]. More...
 
void SetBookVisited ()
 Firsts the time book passed. More...
 
bool IsGameCompleted ()
 
void SetGameCompleted ()
 
bool HasFinalBeenShown ()
 
void SetFinalShown ()
 
PlayerProfileData ToData ()
 Converts this instance to PlayerProfileData. More...
 
PlayerProfile FromData (PlayerProfileData _data)
 Charge this with PlayerProfileData. More...
 
PlayerIconData GetPlayerIconData ()
 
override string ToString ()
 

Public Attributes

string Uuid
 
int AvatarId
 
PlayerGender Gender
 
PlayerTint Tint
 
int Age
 
bool IsDemoUser
 
bool HasFinishedTheGame
 
bool HasFinishedTheGameWithAllStars
 
bool HasMaxStarsInCurrentPlaySessions
 
int TotalNumberOfBones = 8
 
int ConsecutivePlayDays
 
ProfileCompletionState ProfileCompletion = ProfileCompletionState.New
 
AnturaSpace.ShopState CurrentShopState = new AnturaSpace.ShopState()
 

Properties

JourneyPosition MaxJourneyPosition [get]
 
JourneyPosition CurrentJourneyPosition [get]
 
JourneyPosition PreviousJourneyPosition [get]
 
AnturaCustomization CurrentAnturaCustomizations [get]
 The current antura customizations More...
 
List< RewardPackUnlockDataRewardsUnlocked [get]
 Gets or sets the rewards unlocked. More...
 

Detailed Description

A Player Profile contains persistent data on details and on the progression status of a single player.

Member Function Documentation

◆ AddBones()

int Antura.Profile.PlayerProfile.AddBones ( int  _bonesToAdd)

◆ AddRewardUnlocked()

void Antura.Profile.PlayerProfile.AddRewardUnlocked ( RewardPackUnlockData  rewardPackUnlockData)

Adds or update the reward unlocked and persist it.

Parameters
rewardPackUnlockDataThe reward pack.

◆ AddRewardUnlockedAll()

void Antura.Profile.PlayerProfile.AddRewardUnlockedAll ( RewardPackUnlockData  _rewardPackUnlockData)

Add update to db all 'this' reward unlocked.

◆ AddRewardUnlockedRange()

void Antura.Profile.PlayerProfile.AddRewardUnlockedRange ( List< RewardPackUnlockData rewardPackUnlockDatas)

Adds or update a list of unlocked rewards and persist it.

◆ AdvanceCurrentStage()

void Antura.Profile.PlayerProfile.AdvanceCurrentStage ( )

◆ AdvanceMaxJourneyPosition()

void Antura.Profile.PlayerProfile.AdvanceMaxJourneyPosition ( )

Advance the Max journey position based on the next after the Current one.

◆ CheckGameFinished()

void Antura.Profile.PlayerProfile.CheckGameFinished ( )

Check whether the game has finished and update the player icon. Called only when we actually finish the game.

◆ CheckStarsState()

void Antura.Profile.PlayerProfile.CheckStarsState ( )

Check whether the game has finished with all starts and update the player icon. Called at each end of play session.

◆ FirstContactPassed()

void Antura.Profile.PlayerProfile.FirstContactPassed ( int  _step = 1)

Set firsts contact flag as passed for step specified.

Parameters
_stepThe step (1 (default) or 2).

◆ ForcePreviousJourneyPosition()

void Antura.Profile.PlayerProfile.ForcePreviousJourneyPosition ( JourneyPosition  journeyPosition)

◆ FromData()

PlayerProfile Antura.Profile.PlayerProfile.FromData ( PlayerProfileData  _data)

Charge this with PlayerProfileData.

◆ GetNotYetUnlockedRewardCountForType()

int Antura.Profile.PlayerProfile.GetNotYetUnlockedRewardCountForType ( RewardTypes  _rewardType)

Gets the not yet unlocked rewards list.

Parameters
_rewardTypeType of the reward.
Returns

◆ GetPlayerIconData()

PlayerIconData Antura.Profile.PlayerProfile.GetPlayerIconData ( )

◆ GetTotalNumberOfBones()

int Antura.Profile.PlayerProfile.GetTotalNumberOfBones ( )

◆ HasFinalBeenShown()

bool Antura.Profile.PlayerProfile.HasFinalBeenShown ( )

◆ IsAssessmentTime()

bool Antura.Profile.PlayerProfile.IsAssessmentTime ( )

◆ IsAtMaxJourneyPosition()

bool Antura.Profile.PlayerProfile.IsAtMaxJourneyPosition ( )

checks if we are at the max joiurney position

Returns

◆ IsBookVisited()

bool Antura.Profile.PlayerProfile.IsBookVisited ( )

Determines whether [is first time book].

Returns
true if [is first time book]; otherwise, false.

◆ IsFirstContact() [1/2]

bool Antura.Profile.PlayerProfile.IsFirstContact ( )

Determines whether [is first contact].

Returns
true if [is first contact]; otherwise, false.

◆ IsFirstContact() [2/2]

bool Antura.Profile.PlayerProfile.IsFirstContact ( int  _step)

Determines whether [is first contact] whit [the specified step] (1 or 2).

Parameters
_stepThe step.
Returns
true if [is first contact] [the specified step]; otherwise, false.

◆ IsGameCompleted()

bool Antura.Profile.PlayerProfile.IsGameCompleted ( )

◆ LoadRewardsUnlockedFromDB()

List<RewardPackUnlockData> Antura.Profile.PlayerProfile.LoadRewardsUnlockedFromDB ( )

Loads the rewards unlocked from database.

Returns

◆ RemoveBones()

int Antura.Profile.PlayerProfile.RemoveBones ( int  _bonesToRemove)

◆ ResetMaxJourneyPosition()

void Antura.Profile.PlayerProfile.ResetMaxJourneyPosition ( bool  _save = true)

Resets the maximum journey position to 1,1,1.

◆ ResetPlayerProfileCompletion()

void Antura.Profile.PlayerProfile.ResetPlayerProfileCompletion ( )

Resets the player profile completion.

◆ ResetRewardsUnlockedData()

void Antura.Profile.PlayerProfile.ResetRewardsUnlockedData ( )

Resets the rewards unlocked data.

◆ RetractCurrentStage()

void Antura.Profile.PlayerProfile.RetractCurrentStage ( )

◆ RewardCategoryContainsNewElements()

bool Antura.Profile.PlayerProfile.RewardCategoryContainsNewElements ( RewardTypes  _rewardType,
string  _rewardCategory = "" 
)

Return true if Reward category container at least one reward never used by player.

Returns

◆ RewardColorIsNew()

bool Antura.Profile.PlayerProfile.RewardColorIsNew ( string  _itemId,
string  _colorId 
)

Returns

◆ RewardForTypeAvailableYet()

bool Antura.Profile.PlayerProfile.RewardForTypeAvailableYet ( RewardTypes  _rewardType)

Return true if rewards for this type available.

Parameters
_rewardTypeType of the reward.
Returns

◆ RewardItemIsNew()

bool Antura.Profile.PlayerProfile.RewardItemIsNew ( string  _itemId)

Return true if Reward is never used by player.

Returns

◆ Save()

void Antura.Profile.PlayerProfile.Save ( )

Saves this instance.

◆ SaveCustomization()

void Antura.Profile.PlayerProfile.SaveCustomization ( AnturaCustomization  _anturaCustomization = null)

Saves the customization on db.

Parameters
_anturaCustomizationThe antura customization. If null save only on db.

◆ SetBookVisited()

void Antura.Profile.PlayerProfile.SetBookVisited ( )

Firsts the time book passed.

◆ SetCurrentJourneyPosition() [1/2]

void Antura.Profile.PlayerProfile.SetCurrentJourneyPosition ( int  _stage,
int  _lb,
int  _ps,
bool  _save = true 
)

Sets the actual journey position and save to profile.

Note
: check valid data before insert.
Parameters
_stageThe stage.
_lbThe lb.
_psThe ps.
_saveif set to true [save] profile at the end.

◆ SetCurrentJourneyPosition() [2/2]

void Antura.Profile.PlayerProfile.SetCurrentJourneyPosition ( JourneyPosition  _journeyPosition,
bool  _save = true,
bool  _updatePrevToo = true 
)

Sets the actual journey position and save to profile.

Note
: check valid data before insert.
Parameters
_journeyPositionThe journey position.
_saveif set to true [save] profile at the end.

◆ SetFinalShown()

void Antura.Profile.PlayerProfile.SetFinalShown ( )

◆ SetGameCompleted()

void Antura.Profile.PlayerProfile.SetGameCompleted ( )

◆ SetMaxJourneyPosition()

void Antura.Profile.PlayerProfile.SetMaxJourneyPosition ( JourneyPosition  newJourneyPosition,
bool  _save = true 
)

Sets the maximum journey position and save to profile.

Note
: check valid data before insert.
Parameters
newJourneyPositionThe journey position.
_saveif set to true [save] profile at the end.

◆ SetRewardPackUnlockedToNotNew()

void Antura.Profile.PlayerProfile.SetRewardPackUnlockedToNotNew ( string  _rewardPackId)

Mark RewardPackUnlockData as not new and update db entry.

◆ ThereIsSomeNewReward()

bool Antura.Profile.PlayerProfile.ThereIsSomeNewReward ( )

True if there is at least one new reward for this player.

Returns

◆ ToData()

PlayerProfileData Antura.Profile.PlayerProfile.ToData ( )

Converts this instance to PlayerProfileData.

Returns

◆ ToString()

override string Antura.Profile.PlayerProfile.ToString ( )

Member Data Documentation

◆ Age

int Antura.Profile.PlayerProfile.Age

◆ AvatarId

int Antura.Profile.PlayerProfile.AvatarId

◆ ConsecutivePlayDays

int Antura.Profile.PlayerProfile.ConsecutivePlayDays

◆ CurrentShopState

AnturaSpace.ShopState Antura.Profile.PlayerProfile.CurrentShopState = new AnturaSpace.ShopState()

◆ Gender

PlayerGender Antura.Profile.PlayerProfile.Gender

◆ HasFinishedTheGame

bool Antura.Profile.PlayerProfile.HasFinishedTheGame

◆ HasFinishedTheGameWithAllStars

bool Antura.Profile.PlayerProfile.HasFinishedTheGameWithAllStars

◆ HasMaxStarsInCurrentPlaySessions

bool Antura.Profile.PlayerProfile.HasMaxStarsInCurrentPlaySessions

◆ IsDemoUser

bool Antura.Profile.PlayerProfile.IsDemoUser

◆ ProfileCompletion

ProfileCompletionState Antura.Profile.PlayerProfile.ProfileCompletion = ProfileCompletionState.New

◆ Tint

PlayerTint Antura.Profile.PlayerProfile.Tint

◆ TotalNumberOfBones

int Antura.Profile.PlayerProfile.TotalNumberOfBones = 8

◆ Uuid

string Antura.Profile.PlayerProfile.Uuid

Property Documentation

◆ CurrentAnturaCustomizations

AnturaCustomization Antura.Profile.PlayerProfile.CurrentAnturaCustomizations
get

The current antura customizations

◆ CurrentJourneyPosition

JourneyPosition Antura.Profile.PlayerProfile.CurrentJourneyPosition
get

◆ MaxJourneyPosition

JourneyPosition Antura.Profile.PlayerProfile.MaxJourneyPosition
get

◆ PreviousJourneyPosition

JourneyPosition Antura.Profile.PlayerProfile.PreviousJourneyPosition
get

◆ RewardsUnlocked

List<RewardPackUnlockData> Antura.Profile.PlayerProfile.RewardsUnlocked
get

Gets or sets the rewards unlocked.

The rewards unlocked.


The documentation for this class was generated from the following file: