Esempio n. 1
0
        public void UpdateValues()
        {
            LDtkFields fields = GetComponent <LDtkFields>();

            _textMesh.text  = fields.GetString("text");
            _textMesh.color = fields.GetColor("color");
        }
Esempio n. 2
0
 public LDtkFieldDrawerPoints(LDtkFields fields, string identifier, EditorDisplayMode mode, Vector3 middleCenter)
 {
     _fields       = fields;
     _identifier   = identifier;
     _mode         = mode;
     _middleCenter = middleCenter;
 }
Esempio n. 3
0
 public LDtkFieldDrawerRadius(LDtkFields fields, string identifier, EditorDisplayMode mode, float gridSize)
 {
     _fields     = fields;
     _identifier = identifier;
     _mode       = mode;
     _gridSize   = gridSize;
 }
Esempio n. 4
0
        public void InjectEntityFields()
        {
            if (_fieldInstances.IsNullOrEmpty())
            {
                return;
            }

            if (!_instance.TryGetComponent(out LDtkFields fields))
            {
                fields = _instance.AddComponent <LDtkFields>();
            }

            LDtkField[] fieldData = GetFields();
            fields.SetFieldData(fieldData);

            FieldsComponent = fields;
        }