public void Activation() { Temps = 0; Actif = true; CS.CameraShake(); GameObject sonelec = Instantiate(Resources.Load<GameObject>("Prefabs/SonElec"), transform.position, transform.rotation); Decharge.Play(); }
private void OnTriggerEnter(Collider other) { if (other.GetComponent <IAMovement>() != null && it.Player != null) { CS.CameraShake(); other.GetComponent <IAMovement>().Hited(transform.position, true); bc.enabled = false; AddObjectSound(); } }
//Casts a single projectile private void CastProjectile(Vector3 castPoint, Vector3 spread, float scale, int castPointID) { StartCoroutine(cam.CameraShake(transform.position - castPoints[castPointID].position, currentSpell.manaCost / 100f, 0.1f)); currentSpellObject = projectileSpells [currentSpell.spellBase]; GameObject spell = Instantiate(currentSpellObject, castPoint, castPoints[castPointID].rotation, projectileList); spell.transform.localScale *= scale; ApplySpellEffects(spell); spell.transform.Rotate(spread); }
public void Utilisation(IAMovement theIA) { Amorçé = false; CS.CameraShake(); theIA.Hited(transform.position, false, false); theIA.Brulé = true; switch (PiegeType) { case aPiege.Barbecue: GameObject theFeu = Instantiate(Resources.Load <GameObject>("Prefabs/Feu"), theIA.transform.position, Resources.Load <GameObject>("Prefabs/Feu").transform.rotation); theFeu.GetComponent <enFeu>().cible = theIA.transform; GameObject theExplosion = Instantiate(Resources.Load <GameObject>("Prefabs/SonExplosion"), theIA.transform.position, Resources.Load <GameObject>("Prefabs/SonExplosion").transform.rotation); break; } }