Exemplo n.º 1
0
    public characterBase()
    {
        ID = "000001";
        Name = "Player";
        STRlvl = 5;
        AGIlvl = 5;
        DEXlvl = 5;
        WILlvl = 5;

        MaxHP = Mathf.Round(GlobalSettings.baseHealth * (Mathf.Pow(STRlvl, GlobalSettings.strIncrHealth) + Mathf.Pow(WILlvl, GlobalSettings.willIncrHealth)));

        CurrentHP = _maxHP;

           // Icon = null;
        SkinColour = GlobalSettings.skinColors[Random.Range(0, GlobalSettings.skinColors.Length - 1)];
        HairColour = GlobalSettings.hairColors[Random.Range(0, GlobalSettings.hairColors.Length - 1)];

        /////////////////////////////////////////////////////

        MoveSpeed = 5; //needs calculated.
        PickupDist = 2f; //needs calculation

        /////////////////////////////////////////////////////

        Inventory = new storageBase();

        //make a list in global settings, that will load from resources

          //  _inventory = new storageBase();
    }
Exemplo n.º 2
0
    public characterBase(string id, string name,int str, int agi, int dex, int will,/* Sprite ava,*/Color skin,Color hair, storageBase inv)
    {
        ID = id;
        Name = name;
        STRlvl = str;
        AGIlvl = agi;
        DEXlvl = dex;
        WILlvl = will;
        MaxHP = Mathf.Round(GlobalSettings.baseHealth * (Mathf.Pow(STRlvl, GlobalSettings.strIncrHealth) + Mathf.Pow(WILlvl, GlobalSettings.willIncrHealth)));
        CurrentHP = MaxHP;
        HairColour = hair;
        SkinColour = skin;
          //  Icon = ava;

        /////////////////////////////////////////////////////

        MoveSpeed = 5; //needs calculated.
        PickupDist = 2f; //needs calculation

        /////////////////////////////////////////////////////

        Inventory = inv;

          //  _inventory = new storageBase(); //player might not have inventory
    }
Exemplo n.º 3
0
 public containerBase(containerBase container)
 {
     ContainerName = container.ContainerName;
     Storage = new storageBase(container.Storage.Rows, container.Storage.Cols, container.Storage.Capacity, container.Storage.SpoilRate);
 }
Exemplo n.º 4
0
 public containerBase(string id, string name, int r, int c, float w, float s)
 {
     MyID = id;
     ContainerName = name;
     Storage = new storageBase(r,c,w,s);
 }
Exemplo n.º 5
0
 // CanvasGroup itemPanel;
 //default container
 public containerBase()
 {
     ContainerName = "Default Container";
     Storage = new storageBase(3,3,50,0.2f);
 }
Exemplo n.º 6
0
 void Awake()
 {
     itemDB = FindObjectOfType<itemDatabase>();
     if(typeID != null)
     {
         if(itemDB.getContainerWithID(typeID) != null)
         {
             containerBase cont = itemDB.getContainerWithID(typeID);
             ContainerName = cont.ContainerName;
             Storage = new storageBase(cont.Storage.Rows, cont.Storage.Cols, cont.Storage.Capacity, cont.Storage.SpoilRate);
         }
         else
         {
             print("id not found");
         }
         //containerBase(itemDB.getContainerWithID(typeID));
     }
     else
     {
         print("id not entered");
     }
 }