Ejemplo n.º 1
0
        public Mini(GameObject mini)
        {
            Miniature m = mini.GetComponent <Miniature>();

            miniatureId = m.GetMiniatureId();
            attributes  = m.GetAttributes();
            x           = mini.transform.position.x;
            y           = mini.transform.position.y;
            z           = mini.transform.position.z;
        }
Ejemplo n.º 2
0
    public void Awake()
    {
        Miniature mini_script = this.transform.parent.GetComponent <Miniature>();
        Dictionary <string, string> attributes = mini_script.GetAttributes();
        string name   = "",
               size   = "",
               hp     = "",
               status = "";

        attributes.TryGetValue("Name", out name);
        attributes.TryGetValue("Size", out size);
        attributes.TryGetValue("HP", out hp);
        attributes.TryGetValue("Status", out status);
        setFieldText("Name", name);
        setFieldText("Size", size);
        setFieldText("HP", hp);
        setFieldText("Affliction", status);
    }