private void OnTriggerEnter2D(Collider2D other) { if (other.attachedRigidbody.tag == "Player") { DisableProjectile(); PlayerController player = other.attachedRigidbody.GetComponent <PlayerController>(); if (player != null) { player.DamagePlayer(); } } else if (other.attachedRigidbody.tag == "Boss") { DisableProjectile(); BossLogic bossLogic = other.attachedRigidbody.GetComponent <BossLogic>(); if (bossLogic != null) { bossLogic.DamageBoss(data.damage); } } else if ((col.tag == "PlayerAttack" && other.tag == "BossAttack") || (col.tag == "BossAttack" && other.tag == "PlayerAttack")) { DisableProjectile(); } }
// Start is called before the first frame update void Start() { isMoving = true; myCurrentWaypoint = 0; myStats = GetComponentInParent <BossLogic>(); speed = 0.3f; chargeUpParticle = GetComponentInChildren <ParticleSystem>(); animator = GetComponentInChildren <Animator>(); }
private void Start() { boss = GameObject.FindWithTag("Boss"); boss.transform.position = bossSpawn.position; bossLogic = boss.GetComponent <BossLogic>(); generatorActive = true; generatorCamLocation = GameObject.FindWithTag("Generator").transform; if (generatorCamLocation == null) { Debug.Log("ERROR: Generator Location not found"); } player = Instantiate(playerPrefab); playerController = player.GetComponent <PlayerController>(); }
// Constructors public FightData(ushort id, bool requirePhases) { ID = id; _requirePhases = requirePhases; switch (ParseEnum.GetBossIDS(id)) { case ParseEnum.BossIDS.ValeGuardian: Logic = new ValeGuardian(id); break; case ParseEnum.BossIDS.Gorseval: Logic = new Gorseval(id); break; case ParseEnum.BossIDS.Sabetha: Logic = new Sabetha(id); break; case ParseEnum.BossIDS.Slothasor: Logic = new Slothasor(id); break; case ParseEnum.BossIDS.Matthias: Logic = new Matthias(id); break; case ParseEnum.BossIDS.KeepConstruct: Logic = new KeepConstruct(id); break; case ParseEnum.BossIDS.Xera: Logic = new Xera(id); break; case ParseEnum.BossIDS.Cairn: Logic = new Cairn(id); break; case ParseEnum.BossIDS.MursaatOverseer: Logic = new MursaatOverseer(id); break; case ParseEnum.BossIDS.Samarog: Logic = new Samarog(id); break; case ParseEnum.BossIDS.Deimos: Logic = new Deimos(id); break; case ParseEnum.BossIDS.SoullessHorror: Logic = new SoullessHorror(id); break; case ParseEnum.BossIDS.Dhuum: Logic = new Dhuum(id); break; case ParseEnum.BossIDS.ConjuredAmalgamate: Logic = new ConjuredAmalgamate(id); break; case ParseEnum.BossIDS.Kenut: case ParseEnum.BossIDS.Nikare: Logic = new TwinLargos(id); break; case ParseEnum.BossIDS.Qadim: Logic = new Qadim(id); break; case ParseEnum.BossIDS.MAMA: Logic = new MAMA(id); break; case ParseEnum.BossIDS.Siax: Logic = new Siax(id); break; case ParseEnum.BossIDS.Ensolyss: Logic = new Ensolyss(id); break; case ParseEnum.BossIDS.Skorvald: Logic = new Skorvald(id); break; case ParseEnum.BossIDS.Artsariiv: Logic = new Artsariiv(id); break; case ParseEnum.BossIDS.Arkk: Logic = new Arkk(id); break; case ParseEnum.BossIDS.MassiveGolem: case ParseEnum.BossIDS.AvgGolem: case ParseEnum.BossIDS.LGolem: case ParseEnum.BossIDS.MedGolem: case ParseEnum.BossIDS.StdGolem: Logic = new Golem(id); break; default: // Unknown Logic = new BossLogic(id); break; } }