Exemplo n.º 1
0
 private void Awake()
 {
     Instance          = this;
     playerMain        = GetComponent <PlayerMain>();
     materialTintColor = GetComponent <MaterialTintColor>();
     aimLightTransform = transform.Find("AimLight");
     state             = State.Normal;
     healthSystem      = new HealthSystem(100);
     healthBar         = new World_Bar(transform, new Vector3(0, 10), new Vector3(12, 1.5f), Color.grey, Color.red, 1f, 10000, new World_Bar.Outline {
         color = Color.black, size = .5f
     });
     healthSystem.OnHealthChanged += HealthSystem_OnHealthChanged;
     weaponPistol  = new Weapon(Weapon.WeaponType.Pistol);
     weaponShotgun = new Weapon(Weapon.WeaponType.Shotgun);
     weaponRifle   = new Weapon(Weapon.WeaponType.Rifle);
     weaponPunch   = new Weapon(Weapon.WeaponType.Punch);
 }