Example #1
0
        private void CreateSmoke(DamageState state)
        {
            if (this.ParticlePanel == null)
            {
                this.ParticlePanel = base.get_transform().FindChild("ParticlePanel");
            }
            this.Smoke = Util.Instantiate(Resources.Load("Prefabs/Common/BannerSmokes") as GameObject, this.ParticlePanel.get_gameObject(), false, false);
            float num = this.getMagnification() / base.get_transform().get_localScale().x;

            this.Smoke.get_transform().localScaleX(num);
            this.Smoke.get_transform().localScaleY(num);
            this.bannerSmokes = this.Smoke.GetComponent <BannerSmokes>();
            if (!this.ParticlePanel.get_gameObject().get_activeSelf())
            {
                this.ParticlePanel.get_gameObject().SetActive(true);
            }
        }
        private void CreateSmoke(DamageState state)
        {
            if (ParticlePanel == null)
            {
                ParticlePanel = base.transform.FindChild("ParticlePanel");
            }
            Smoke = Util.Instantiate(Resources.Load("Prefabs/Common/BannerSmokes") as GameObject, ParticlePanel.gameObject);
            float   magnification = getMagnification();
            Vector3 localScale    = base.transform.localScale;
            float   num           = magnification / localScale.x;

            Smoke.transform.localScaleX(num);
            Smoke.transform.localScaleY(num);
            bannerSmokes = Smoke.GetComponent <BannerSmokes>();
            if (!ParticlePanel.gameObject.activeSelf)
            {
                ParticlePanel.gameObject.SetActive(true);
            }
        }