コード例 #1
0
ファイル: characterBase.cs プロジェクト: Drone5/3DZ
    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();
    }
コード例 #2
0
ファイル: characterBase.cs プロジェクト: Drone5/3DZ
    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
    }
コード例 #3
0
ファイル: containerBase.cs プロジェクト: Drone5/3DZ
 public containerBase(containerBase container)
 {
     ContainerName = container.ContainerName;
     Storage = new storageBase(container.Storage.Rows, container.Storage.Cols, container.Storage.Capacity, container.Storage.SpoilRate);
 }
コード例 #4
0
ファイル: containerBase.cs プロジェクト: Drone5/3DZ
 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);
 }
コード例 #5
0
ファイル: containerBase.cs プロジェクト: Drone5/3DZ
 // CanvasGroup itemPanel;
 //default container
 public containerBase()
 {
     ContainerName = "Default Container";
     Storage = new storageBase(3,3,50,0.2f);
 }
コード例 #6
0
ファイル: containerBase.cs プロジェクト: Drone5/3DZ
 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");
     }
 }