public PlayerData(Player player) { position = player.transform.position; currency = player.Currency; maxHealth = player.MaxHealth; currentHealth = player.CurrentHealth; hasShotUpgrade = player.HasShotUpgrade; }
public Save(Vector3Save playerPosition, int hp, int xp, float currentTime, Item[] inventory, float hoursPlayed) { this.playerPosition = playerPosition; this.hp = hp; this.xp = xp; this.currentTime = currentTime; this.inventory = inventory; this.hoursPlayed = hoursPlayed; }
public PlayerData(Player player) { position = player.transform.position; currency = player.Currency; upgrades = player.Upgrades.ToArray(); }
public static Vector3 ConvertToVector3(Vector3Save original) { return(new Vector3(original.x, original.y, original.z)); }