public override bool runAction(BossGOAP boss) { boss.anim.SetFloat("speed", 0); boss.anim.SetTrigger("Teleport"); boss.StartCoroutine(boss.Teleport(boss.healPosition.position, 1f)); return(true); }
public override bool runAction(BossGOAP boss) { boss.anim.SetFloat("speed", 0); boss.anim.SetTrigger("Teleport"); if (boss.selectedPath == boss.allWalkLocations.Count - 1) { boss.selectedPath = 0; } else { boss.selectedPath++; } boss.StartCoroutine(boss.Teleport(boss.allWalkLocations[boss.selectedPath][boss.selectedPath].position, 1f)); boss.worldState.states.Clear(); boss.worldState.states.Add("canMove"); return(true); }
public override bool runAction(BossGOAP boss) { if (boss.currentHealth >= boss.maxHealth || boss.damageTaken >= 100) { Debug.Log("damaged"); if (boss.currentHealth >= boss.maxHealth) { boss.currentHealth = boss.maxHealth; } boss.StartCoroutine(boss.Teleport(boss.allWalkLocations[boss.selectedPath][boss.selectedPath].position, 1f)); boss.worldState.states.Clear(); boss.worldState.states.Add("canMove"); return(true); } else { Debug.Log(boss.damageTaken); Debug.Log("Healing"); boss.Damage(-50f * Time.deltaTime); return(false); } }