MusicBeat
This commit is contained in:
@@ -36,7 +36,7 @@ namespace Cielonos.MainGame.Characters
|
||||
public bool isDuringCameraSwitch;
|
||||
private const float CameraSwitchCooldown = 0.25f;
|
||||
|
||||
public CharacterBase lockTarget;
|
||||
public Enemy lockTarget;
|
||||
private float lastTargetSwitchTime;
|
||||
private const float TargetSwitchCooldown = 0.25f;
|
||||
public Transform targetPoint;
|
||||
@@ -90,7 +90,7 @@ namespace Cielonos.MainGame.Characters
|
||||
{
|
||||
if(isDuringCameraSwitch) return;
|
||||
|
||||
CharacterBase target = CombatManager.EnemySm.GetNearestEnemy(50f);
|
||||
Enemy target = CombatManager.EnemySm.GetNearestEnemy(50f);
|
||||
|
||||
if (target != null)
|
||||
{
|
||||
@@ -168,7 +168,7 @@ namespace Cielonos.MainGame.Characters
|
||||
|
||||
if (Time.time - lastTargetSwitchTime < TargetSwitchCooldown) return;
|
||||
|
||||
List<CharacterBase> sortedEnemies = CombatManager.EnemySm.GetVisibleEnemiesSortedByScreenX();
|
||||
List<Enemy> sortedEnemies = CombatManager.EnemySm.GetVisibleEnemiesSortedByScreenX();
|
||||
if (sortedEnemies.Count <= 1) return;
|
||||
|
||||
int currentIndex = sortedEnemies.IndexOf(lockTarget);
|
||||
@@ -198,7 +198,7 @@ namespace Cielonos.MainGame.Characters
|
||||
SetNewTarget(sortedEnemies[newIndex]);
|
||||
}
|
||||
|
||||
private void SetNewTarget(CharacterBase newTarget)
|
||||
private void SetNewTarget(Enemy newTarget)
|
||||
{
|
||||
if (lockTarget != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user