public void MirrorImageDamage() { if (doneMirrorImageAttack) { return; } doneMirrorImageAttack = true; Lanes attackLanes; switch (actualLane) { case Lanes.L: attackLanes = Lanes.RM; break; case Lanes.M: attackLanes = Lanes.LR; break; case Lanes.R: attackLanes = Lanes.LM; break; default: attackLanes = Lanes.M; break; } player.BossAttacked(staffDamage, attackLanes); }
void OnCollisionEnter(Collision col) { if (!collided && col.gameObject.tag == "Hitbox") { collided = true; PlayerInterface playerInt = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController> (); PlayerController player = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerController> (); /*if (player.attacking && (lane & Lanes.M) != Lanes.None) { * playerInt.BossAttacked (34, Lanes.A); * } else if(!player.attacking) { * playerInt.BossAttacked (34, Lanes.A); * }*/ playerInt.BossAttacked(34, Lanes.A); } else if (!collided && col.gameObject.tag == "Backwall") { collided = true; Rigidbody rb = gameObject.GetComponent <Rigidbody> (); Vector3 dir = new Vector3(Random.Range(-0.4f, 0.4f), Random.Range(-0.2f, 0.2f), Random.Range(0.0f, 1.0f)); dir.Normalize(); rb.AddForce(dir * 100.0f); } }
void OnTriggerEnter(Collider other) { Icicle i = other.gameObject.GetComponent <Icicle> (); if (i && !i.alreadyhit) { i.alreadyhit = true; player.BossAttacked(damage, i.lane); if (yeti.state == YetiState.GroundPound) { if ((yeti.gpLane & i.lane) != Lanes.None) { yeti.IcicleHurt(damage); } } } }
void punchActivate() { player.BossAttacked(punchDamage, Lanes.M); }
public void PunchCenter() { DoIcicles(); player.BossAttacked(punchDamage, Lanes.M); }