protected override void Build() { // Pre Build Manipulation // Build Control base.Build(); // Post Build Manipulation GameObject part = Object.Instantiate(Packs.Chapter1.Get <GameObject>("prefabSmokeParticles"), Prefab.transform, true); part.name = "SmokePart"; part.transform.localScale = Vector3.one * 0.5f; PlortSmoke smoke = Prefab.AddComponent <PlortSmoke>(); smoke.SetMaxCooldown(40); }
protected override void Build() { // Pre Build Manipulation // Build Control base.Build(); // Post Build Manipulation GameObject part = Object.Instantiate(Packs.Chapter1.Get <GameObject>("prefabSmokeParticles"), Prefab.transform, true); part.name = "SmokePart"; part.transform.localScale = Vector3.one * 0.5f; ParticleSystem.MainModule main = part.GetComponent <ParticleSystem>().main; main.startColor = ColorUtils.FromHex("3194b2"); ParticleSystem.EmissionModule emit = part.GetComponent <ParticleSystem>().emission; emit.rateOverTime = 15; PlortSmoke smoke = Prefab.AddComponent <PlortSmoke>(); smoke.SetMaxCooldown(20); }