using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using static System.Console;
public class Player : MonoBehaviour
{
public string playerName;
public float health;
public int score;
private int level;
public void InitializePlayer()
{
string = Player;
}
public void AddScore(int points)
{
int = 0;
}
abstract class Weapon
{
public abstract int Damage { get; }
public abstract void Fire();
public void ShowInfo()
{
Console.WriteLine($"[GetType().Name) Damage: {Damage}");
}
}
class Gun : Weapon
{
public override int Damage { get { return 5; } }
public override void Fire()
{
Console.WriteLine("Пыщ");
}
}
public int updateLocalLevel()
{
int currentLevel = Integer.parseInt(returnDBLevel());
int currentTotalXP = Integer.parseInt(returnDBTotalXP());
if (currentTotalXP < 100)
{
}
else if (currentTotalXP >= 100 & currentTotalXP < 199)
{
currentLevel++;
}
else if (currentTotalXP >= 200 & currentTotalXP < 299)
{
currentLevel++;
}
else if (currentTotalXP >= 300 & currentTotalXP < 399)
{
currentLevel++;
}
else if (currentTotalXP >= 400 & currentTotalXP < 499)
{
currentLevel++;
}
else if (currentTotalXP >= 500 & currentTotalXP < 599)
{
currentLevel++;
}
return currentLevel;
}
}
public void InitializePlayer()
{
string = Player;
}
public void AddScore(int points)
{
int = 0;
}