示例#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;
 }
示例#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;
 }
示例#3
0
 internal void OnEnter(MapCell mapCell)
 {
     var creature = Game?.Configuration?.GetCreature(DescriptorIdentifier);
     RunScript(Scripts.OnEnter, this, creature, null, null, mapCell);
 }
示例#4
0
 public abstract object RunScript(string scriptName, InstanceBase self, Descriptor selfDescriptor, InstanceBase other, Descriptor otherDescriptor, MapCell where);
示例#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);
 }
示例#6
0
 internal bool CanEnter(MapCell mapCell)
 {
     return (bool)this.RunOptionalScript(Scripts.CanEnter, this, Descriptor, null, null, mapCell, true);
 }
示例#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;
 }
示例#8
0
 public void SetMapCell(int mapRow, MapCell value)
 {
     this[mapRow] = value;
 }
示例#9
0
 private object DefaultAction(InstanceBase selfInstance, Descriptor selfDescriptor, InstanceBase otherInstance, Descriptor otherDescriptor, MapCell where)
 {
     throw new NotImplementedException();
 }
示例#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;
 }
示例#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;
 }