Beispiel #1
0
        public bool Move(MoveDirection dir)
        {
            var target = dir.ToVec3Int();

            target += LevelManager.Instance.floorMap.WorldToCell(transform.position);

            if (LevelManager.Instance.floorMap.HasTile(target))
            {
                transform.position = LevelManager.Instance.floorMap.CellToWorld(target) + positionFix + Vector3.back;
                tilePos            = GetCurrentPosition();
                return(true);
            }

            return(false);
        }