Ejemplo n.º 1
0
 public void SetMapCell(int map, int mapColumn, int mapRow, MapCell value)
 {
     if (GetMapColumn(map, mapColumn) == null)
     {
         SetMapColumn(map, mapColumn, new MapColumn());
     }
     this[map][mapColumn][mapRow] = value;
 }
Ejemplo n.º 2
0
 public MapCell GetMapCell(int map, int mapColumn, int mapRow, bool autoCreate = false)
 {
     var result = GetMapColumn(map, mapColumn) == null ? null : this[map][mapColumn][mapRow];
     if (result == null && autoCreate)
     {
         result = new MapCell();
         SetMapCell(map, mapColumn, mapRow, result);
     }
     return result;
 }
Ejemplo n.º 3
0
 internal void OnEnter(MapCell mapCell)
 {
     var creature = Game?.Configuration?.GetCreature(DescriptorIdentifier);
     RunScript(Scripts.OnEnter, this, creature, null, null, mapCell);
 }
Ejemplo n.º 4
0
 public abstract object RunScript(string scriptName, InstanceBase self, Descriptor selfDescriptor, InstanceBase other, Descriptor otherDescriptor, MapCell where);
Ejemplo n.º 5
0
 public override object RunScript(string scriptName, InstanceBase self, Descriptor selfDescriptor, InstanceBase other, Descriptor otherDescriptor, MapCell where)
 {
     return Configuration?.Game?.RunScript(GetScript(scriptName), self, selfDescriptor, other, otherDescriptor, where);
 }
Ejemplo n.º 6
0
 internal bool CanEnter(MapCell mapCell)
 {
     return (bool)this.RunOptionalScript(Scripts.CanEnter, this, Descriptor, null, null, mapCell, true);
 }
Ejemplo n.º 7
0
 public MapCell GetMapCell(int mapRow, bool autoCreate = false)
 {
     var result = this[mapRow];
     if (result == null && autoCreate)
     {
         result = new MapCell();
         SetMapCell(mapRow, result);
     }
     return result;
 }
Ejemplo n.º 8
0
 public void SetMapCell(int mapRow, MapCell value)
 {
     this[mapRow] = value;
 }
Ejemplo n.º 9
0
 private object DefaultAction(InstanceBase selfInstance, Descriptor selfDescriptor, InstanceBase otherInstance, Descriptor otherDescriptor, MapCell where)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 10
0
 public void SetMapCell(int atlas,int atlasColumn,int atlasRow,int map,int mapColumn,int mapRow, MapCell value)
 {
     if (GetMapColumn(atlas, atlasColumn, atlasRow, map, mapColumn) == null)
     {
         SetMapColumn(atlas, atlasColumn, atlasRow, map, mapColumn, new MapColumn());
     }
     this[atlas][atlasColumn][atlasRow][map][mapColumn][mapRow] = value;
 }
Ejemplo n.º 11
0
 public object RunScript(string scriptName, InstanceBase self, Descriptor selfDescriptor, InstanceBase other, Descriptor otherDescriptor, MapCell where)
 {
     if(ScriptTable!= null)
     {
         return ScriptTable[scriptName](self, selfDescriptor, other, otherDescriptor, where);
     }
     return null;
 }