some small fixes

This commit is contained in:
AlexMamontow 2021-09-23 14:44:46 +03:00
parent c45632247d
commit 7611537b34
3 changed files with 4 additions and 20 deletions

View File

@ -454,16 +454,6 @@ public class AI_BotController : MonoBehaviour
private void AttackEnemy(PlayerState currentEnemy) private void AttackEnemy(PlayerState currentEnemy)
{ {
/*if (currentEnemy && Vector3.Distance(currentEnemy.transform.position, transform.position) < 1.1f * TileManagment.tileOffset)
{
//Debug.Log("startAttack");
//isAttackedOnce = true;
leftInput = Vector2.zero;
_currentFollowingPath.Clear();
_actionTriggerSystem.TriggerAction(currentEnemy.currentTile, _playerState.defaultAction);
StartPatrolBehaviour();
}*/
leftInput = Vector2.zero; leftInput = Vector2.zero;
_currentFollowingPath.Clear(); _currentFollowingPath.Clear();
_actionTriggerSystem.TriggerAction(currentEnemy.currentTile, _playerState.defaultAction); _actionTriggerSystem.TriggerAction(currentEnemy.currentTile, _playerState.defaultAction);
@ -500,14 +490,8 @@ public class AI_BotController : MonoBehaviour
} }
_currentFollowingPath = Pathfinding.FindPath(curentPos, target, TileManagment.levelTiles, TileManagment.tileOffset); _currentFollowingPath = Pathfinding.FindPath(curentPos, target, TileManagment.levelTiles, TileManagment.tileOffset);
//Debug.Log("created path to " + target); //Debug.Log("created path to " + target);
if (_currentFollowingPath != null) return _currentFollowingPath != null;
{
return true;
}
else
{
return false;
}
} }
private void MoveAlongPath() private void MoveAlongPath()

View File

@ -195,7 +195,7 @@ public class TileManagment : MonoBehaviour
{ {
return resultTile; return resultTile;
}*/ }*/
if (position.x < 0 || position.z > 0.5f) if (position.x < -0.5 || position.z > 0.5f)
{ {
//Debug.Log("null pos"); //Debug.Log("null pos");
return null; return null;

View File

@ -127,7 +127,7 @@ PlayerSettings:
16:10: 1 16:10: 1
16:9: 1 16:9: 1
Others: 1 Others: 1
bundleVersion: 0.38 bundleVersion: 0.40
preloadedAssets: [] preloadedAssets: []
metroInputSource: 0 metroInputSource: 0
wsaTransparentSwapchain: 0 wsaTransparentSwapchain: 0