Hello,
I wonder how to do a data binding on a non behaviour class.
Ex :
public class Item{
public int Id {get;set;}
public Vector2 GeoCoord{get;set;}
public string State{get;set;}
public string Name{get;set;}
public Type Type{get;set;}
public string Icon{get;set;}
public int Aura{get;set;}
public Dictionary<string, int> GOInstanceId{get;set;}
private int ownerId;
public int OwnerId{
get{
return ownerId;
}
set{
ownerId = value;
switch(ownerId){
case -1 : State = "deleted";
break;
case 0 : State = "invisible";
break;
case 1 : State = "free";
break;
default : State = "owned";
break;
}
}
}
public Item (){
GOInstanceId
= new Dictionary
<string,
int>(); }
}
Then I have some view elements : map markers, details info panels with input text, labels...
Is it possible to link this element with the model ?