// Use this for initialization void Start() { redTime = 0; rangedAttack = new SubMachineGun(gameObject); PlayerRDB2D = GetComponent <Rigidbody2D>(); PlayerRender = GetComponent <SpriteRenderer>(); meleeAnim = GetComponent <Animator>(); exp = 0; health = 100; expTIL = 100; maxHealth = health; }
void LoadDate() { DefaultSettings(); this.playerName = "Default"; this.playerClass = "Default"; this.PlayerRB2D = GetComponent <Rigidbody2D>(); this.isMelee = true; this.playerLevel = 1; this.health = 100; //making the game a little easier this.BASE_HEALTH = health; this.speed = 100f; this.experience = 0; this.anim = GetComponent <Animator>(); this.alive = true; this.rangedAttack = new SubMachineGun(gameObject); }