public void SetToFlyingController() { SetController(flyingController); GameObject growWingsParticle = growWingsPool.Spawn(); growWingsParticle.transform.localPosition = new Vector3(0, 0, 0); growWingsParticle.GetComponent <RexParticle>().Play(); }
public void CreateHitSparkAtPosition(Vector2 position, Type type) { RexParticle spark = (type == Type.DamagedSpark) ? damagedSparkPool.Spawn().GetComponent <RexParticle>() : notDamagedSparkPool.Spawn().GetComponent <RexParticle>(); spark.transform.position = position; spark.transform.localEulerAngles = new Vector3(0, 0, RexMath.RandomFloat(0, 360)); spark.Play(); }
protected void SpawnLandingParticle() { GameObject particle = landingParticlePool.Spawn(); ParentHelper.Parent(particle, ParentHelper.ParentObject.Particles); particle.transform.position = new Vector3(landingParticlePool.transform.position.x + particleOffset.x, landingParticlePool.transform.position.y + particleOffset.y, 0.0f); particle.GetComponent <RexParticle>().Play(); }
protected void GenerateExitSplash(Vector2 location, Transform actor) { if (exitSplashPool) { GameObject splash = exitSplashPool.Spawn().gameObject; splash.GetComponent <RexParticle>().Play(); splash.transform.position = new Vector3(location.x, location.y, splash.transform.position.z); } if (CameraHelper.CameraContainsPoint(actor.position, 1.5f)) { PlaySplashSound(); } }
public void ShowNumber(int damageAmount, Vector2 _position) { DamageNumber damageNumber = spawnPool.Spawn().GetComponent <DamageNumber>(); damageNumber.Show(damageAmount, _position, spawnPool); }