Beispiel #1
0
    public Person(string _name, Enums.gender _gender, Vector2Int _pos, Place _current_room,
                  Dictionary <string, float> _likes_traits,
                  Dictionary <string, string> feat_str)
    {
        name     = _name;
        eyesight = 5;

        likes_people = new List <Preference_People>();

        position = _pos;

        memory        = new Memory();
        current_place = _current_room;

        rotation = Enums.rotations.W;

        wanted_object   = null;
        likes_traits    = _likes_traits;
        features_string = feat_str;


        splitPercent    = new char[1];
        splitPercent[0] = '%';
        splitColon      = new char[1];
        splitColon[0]   = ':';
    }
Beispiel #2
0
    public Person(PersonData pd, Place _current_room)
    {
        position = new Vector2Int(pd.xPosition, pd.yPosition);
        rotation = (Enums.rotations)pd.rotation;
        name     = pd.name;

        eyesight = pd.eyesight;

        features_float  = new Dictionary <string, float>();
        features_string = new Dictionary <string, string>();

        splitPercent    = new char[1];
        splitPercent[0] = '%';
        splitColon      = new char[1];
        splitColon[0]   = ':';

        features_float["muscle"]       = pd.muscle;
        features_float["fat"]          = pd.fat;
        features_float["height"]       = pd.height;
        features_float["weight"]       = pd.weight;
        features_float["beauty"]       = pd.beauty;
        features_float["wit"]          = pd.wit;
        features_float["chill"]        = pd.chill;
        features_float["introversion"] = pd.introversion;
        features_float["happiness"]    = pd.happiness;
        features_float["sadness"]      = pd.sadness;
        features_float["anger"]        = pd.anger;
        features_float["fear"]         = pd.fear;
        features_float["disgust"]      = pd.disgust;
        features_float["hunger"]       = pd.hunger;
        features_float["thirst"]       = pd.thirst;
        features_float["tiredness"]    = pd.tiredness;
        features_float["social"]       = pd.social;
        features_float["stress"]       = pd.stress;
        features_float["libido"]       = pd.libido;

        for (int i = 0; i < pd.features.Length; i++)
        {
            string[] f = pd.features[i].Split(splitPercent);
            features_string[f[0]] = f[1];
        }

        preferences   = new Preferences(pd.preferences);
        memory        = new Memory();
        current_place = _current_room;
    }