public void OnDeath() { Player.stats.defeatedBosses.Add(Element.Earth); bossState = EarthBossState.Dead; StartCoroutine(ActivateBioIK(150, 0.5f, false)); animator.SetTrigger("death"); }
public void WakeUpEnd() { if (bossState == EarthBossState.Sleeping) { bossState = EarthBossState.ArmUp; StartCoroutine(ActivateBioIK(400, 3f, true)); StartCoroutine(AILoop()); } }
void RightAttack() { RaycastHit hit; bossState = EarthBossState.ArmDown; Physics.Raycast(Player.gameObject.transform.position, Vector3.down, out hit); target = hit.point + Vector3.down * 15f; // elbowObjective.enabled = false; }
// Start is called before the first frame update void Start() { bossState = EarthBossState.Sleeping; impulse = GetComponent <CinemachineImpulseSource>(); animator = GetComponent <Animator>(); maxHealth = 5; health = maxHealth; colliderVectors = new Dictionary <Collider, Vector3>(); elbowObjective = (BioIK.Position)bioIK.Segments.Where(s => s.name.Equals("LowerArm.R")).Single().Objectives.GetValue(0); colliders = GetComponentsInChildren <MeshCollider>(); colliders.ToList().ForEach(c => colliderVectors[c] = c.transform.position); segments = new Dictionary <string, BioIK.BioSegment>(); bioIK.Segments.ForEach(s => segments[s.name] = s); }
void RetractArm() { bossState = EarthBossState.ArmUp; fistTarget.transform.localPosition = fistPosition; elbowObjective.enabled = true; }