Example #1
0
        public void Start()
        {
            //Log.Normal("PadSmoke Start");
            var tmpList = smokeEmittersNames.Split(seperators, StringSplitOptions.RemoveEmptyEntries);

            foreach (string value in tmpList)
            {
                emitterTransforms.Add(value.Trim());
            }

            Transform receiverTransform = gameObject.transform.FindRecursive(smokeReceiverName);
            Collider  receiverCollider  = receiverTransform.gameObject.GetComponent <Collider>();

            if (receiverCollider != null)
            {
                receiverCollider.tag = "LaunchpadFX";
                //Log.Normal("Collider Tag: " + receiverCollider.tag);
                receiverCollider.gameObject.layer = 15;
                KKPadFX padfx = receiverCollider.gameObject.AddOrGetComponent <KKPadFX>();
                padfx.Setup(emitterTransforms, gameObject, smokeName);
            }
            else
            {
                Log.Warning("PadFX: Collider not found " + smokeReceiverName);
            }
        }
Example #2
0
        public void Start()
        {
            emitterTransforms = smokeEmittersNames.Split(seperators, StringSplitOptions.RemoveEmptyEntries).ToList();

            Transform receiverTransform = gameObject.transform.FindRecursive(smokeReceiverName);
            Collider  receiverCollider  = receiverTransform.gameObject.GetComponent <Collider>();

            if (receiverCollider != null)
            {
                receiverCollider.tag = "LaunchpadFX";
                //receiverCollider.gameObject.layer = (1 << 30);

                KKPadFX padfx = receiverCollider.gameObject.AddComponent <KKPadFX>();
                padfx.Setup(emitterTransforms);
            }
        }