示例#1
0
 public RLBrain(
     RLCreature _myDude,
     RLGame _game
 )
 {
     myDude = _myDude;
     game = _game;
 }
示例#2
0
 public MoveEvent(
     RLCreature _actor,
     int _direction,
     RLTile _source = null
 )
 {
     Actor = _actor;
     Source = _source ?? _actor.Tile;
     Direction = _direction;
 }
示例#3
0
 public static void Move(
     RLCreature _actor,
     RLTile _source,
     RLTile _destination
 )
 {
     if(_source != null)
         _source.Creature = null;
     _destination.Creature = _actor;
     _actor.Tile = _destination;
 }
示例#4
0
        public static RLCreature LoadCreature(
            string _entry,
            ref Dictionary<int, RLTileMap> _tilemaps
        )
        {
            RLCreature _return;

            List<string> _elements =
                _entry.Split(
                    new char[] { ';' } //wtf
            ).ToList();

            List<string> _coord =
                _elements[3].Split(
                    new char[] { ',' }
            ).ToList();

            int _ID;
            int _mapID;
            int _x, _y;
            int _facing;

            Int32.TryParse(_elements[0], out _ID);
            Int32.TryParse(_elements[1], out _mapID);
            Int32.TryParse(_coord[0], out _x);
            Int32.TryParse(_coord[1], out _y);
            Int32.TryParse(_elements[4], out _facing);

            _return = new RLCreature();
            _return.ID = _ID;
            _return.Texture = _elements[2];
            _return.Tile = _tilemaps[_mapID][_x, _y];
            _return.Tile.Creature = _return;
            _return.Facing = _facing;

            return _return;
        }
示例#5
0
 public RLBrain(RLCreature _myDude)
     : this(_myDude, null)
 {
 }
示例#6
0
 public ChaserBrain(
     RLCreature _myDude,
     RLGame _game)
     : base(_myDude, _game)
 {
 }