Wizard - fix parameters

This commit is contained in:
kabix09 2023-01-14 14:39:29 +01:00
parent eb3f0d1cc2
commit 4d3c3051df
5 changed files with 689 additions and 345 deletions

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -140,19 +140,13 @@ public class DungeonManager : MonoBehaviour
public void BuildWizard()
{
Vector3 teleportCoords;
Debug.Log("creating wizard!!!!!!!!!!!");
do
{
teleportCoords = GameObject.FindObjectOfType<TileMapGenerator>().gameObject.GetComponent<TileMapGenerator>().randomCoordsForStanding();
Debug.Log(Vector2.Distance(teleportCoords, GameObject.FindGameObjectWithTag("Player").gameObject.transform.position));
Debug.Log("player position: " + GameObject.FindGameObjectWithTag("Player").gameObject.transform.position);
} while (!(Vector2.Distance(teleportCoords, GameObject.FindGameObjectWithTag("Player").gameObject.transform.position) > 6 &&
Vector2.Distance(teleportCoords, GameObject.FindGameObjectWithTag("Player").gameObject.transform.position) < 9));
Debug.Log(teleportCoords);
Debug.Log(Vector2.Distance(teleportCoords, GameObject.FindGameObjectWithTag("Player").gameObject.transform.position));
var newWizard = Instantiate(Wizard, teleportCoords, Quaternion.identity);
//newWizard.transform.localPosition = teleportCoords;

View File

@ -457,7 +457,7 @@ class BattleWizard : MonoBehaviour
{
enemy.isKinematic = false;
Vector2 difference = enemy.transform.position - player.transform.position;
difference = difference.normalized * 5; // thrust
difference = difference.normalized * 10; // thrust
enemy.AddForce(difference, ForceMode2D.Impulse);
//StartCoroutine(KnockCo(enemy));
}
@ -525,23 +525,23 @@ class BattleWizard : MonoBehaviour
{
if (currentHealth > maxHealth * 0.75f)
{
gameObject.GetComponent<AStarPathfindingAgent>().speed = 1f;
gameObject.GetComponent<AStarPathfindingAgent>().speed = 2f;
timeToWaitBeforeNextAttack = 1f;
}
else if (currentHealth <= maxHealth * 0.75f && currentHealth > maxHealth * 0.50f)
{
gameObject.GetComponent<AStarPathfindingAgent>().speed = 1.15f;
gameObject.GetComponent<AStarPathfindingAgent>().speed = 2.55f;
timeToWaitBeforeNextAttack = 0.8f;
}
else if (currentHealth <= maxHealth * 0.50f && currentHealth > maxHealth * 0.25f)
{
gameObject.GetComponent<AStarPathfindingAgent>().speed = 1.30f;
gameObject.GetComponent<AStarPathfindingAgent>().speed = 3;
timeToWaitBeforeNextAttack = 0.7f;
}
else if (currentHealth <= maxHealth * 0.25f && currentHealth > maxHealth * 0.10f)
{
gameObject.GetComponent<AStarPathfindingAgent>().speed = 1.45f;
gameObject.GetComponent<AStarPathfindingAgent>().speed = 3.25f;
timeToWaitBeforeNextAttack = 0.6f;
}
}

View File

@ -74,9 +74,11 @@ class EscapingWizard : MonoBehaviour
} else
{
//anim.SetBool("isRunning", false);
StopAllCoroutines();
gameObject.GetComponent<NPC>().State = NPCStateEnum.Pending;
anim.SetBool("isRunning", false);
}
}