Example #1
0
    public void OnDeath()
    {
        Player.stats.defeatedBosses.Add(Element.Earth);
        bossState = EarthBossState.Dead;
        StartCoroutine(ActivateBioIK(150, 0.5f, false));

        animator.SetTrigger("death");
    }
Example #2
0
 public void WakeUpEnd()
 {
     if (bossState == EarthBossState.Sleeping)
     {
         bossState = EarthBossState.ArmUp;
         StartCoroutine(ActivateBioIK(400, 3f, true));
         StartCoroutine(AILoop());
     }
 }
Example #3
0
    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;
    }
Example #4
0
 // 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);
 }
Example #5
0
 void RetractArm()
 {
     bossState = EarthBossState.ArmUp;
     fistTarget.transform.localPosition = fistPosition;
     elbowObjective.enabled             = true;
 }