Beispiel #1
0
    // Start is called before the first frame update
    new void Start()
    {
        base.Start();
        fMoveRate     = 7f; //5f;
        Stats.Health *= 1.5f;
        Stats.SetMaxHP(Stats.Health);
        MyHUD.transform.Find("HealthBarPanel").GetComponent <HealthHUD>().SetMaxHP(Stats);
        fAttackRadius = 5f;
        fProjSpeed    = 10f;

        if (basicWeapon != null)
        {
            WeaponInventory.AddItem(basicWeapon);
        }
    }
Beispiel #2
0
 // Start is called before the first frame update
 new void Start()
 {
     base.Start();
     fMoveRate  = 9f;//10f;
     fProjSpeed = 20f;
     MyHUD.transform.Find("HealthBarPanel").GetComponent <HealthHUD>().SetMaxHP(Stats);
     for (int i = 0; i < gameObject.transform.childCount; i++)
     {
         GameObject child = gameObject.transform.GetChild(i).gameObject;
         if (child.tag == "Weapon")
         {
             print(child.GetComponent <Item>().name);
             WeaponInventory.AddItem(child.GetComponent <Item>());
             break;
         }
     }
 }