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