Пример #1
0
 public void Start()
 {
     if (base.photonView != null)
     {
         float        num2;
         float        num3;
         float        num4;
         float        num5;
         PhotonPlayer owner = base.photonView.owner;
         if (GameSettings.teamMode > 0)
         {
             int num = RCextensions.returnIntFromObject(owner.customProperties[PhotonPlayerProperty.RCteam]);
             if (num == 1)
             {
                 base.GetComponent <ParticleSystem>().startColor = Color.cyan;
             }
             else if (num == 2)
             {
                 base.GetComponent <ParticleSystem>().startColor = Color.magenta;
             }
             else
             {
                 num2 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombR]);
                 num3 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombG]);
                 num4 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombB]);
                 num5 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombA]);
                 num5 = Mathf.Max(0.5f, num5);
                 //if (FengGameManagerMKII.RandomizeBombColor)
                 //{
                 //    System.Random rnd = new System.Random();
                 //base.GetComponent<ParticleSystem>().startColor = new Color(RCextensions.NextFloat(rnd), RCextensions.NextFloat(rnd), RCextensions.NextFloat(rnd), RCextensions.NextFloat(rnd));
                 //}
                 base.GetComponent <ParticleSystem>().startColor = new Color(num2, num3, num4, num5);
             }
         }
         else
         {
             num2 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombR]);
             num3 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombG]);
             num4 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombB]);
             num5 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombA]);
             num5 = Mathf.Max(0.5f, num5);
             //if (FengGameManagerMKII.RandomizeBombColor)
             //{
             //    System.Random rnd = new System.Random();
             //    base.GetComponent<ParticleSystem>().startColor = new Color(RCextensions.NextFloat(rnd), RCextensions.NextFloat(rnd), RCextensions.NextFloat(rnd), RCextensions.NextFloat(rnd));
             //}
             base.GetComponent <ParticleSystem>().startColor = new Color(num2, num3, num4, num5);
         }
         float num6 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombRadius]) * 2f;
         num6 = Mathf.Clamp(num6, 40f, 120f);
         base.GetComponent <ParticleSystem>().startSize = num6;
     }
 }
Пример #2
0
    public void Start()
    {
        if (photonView != null)
        {
            float num2;
            float num3;
            float num4;
            float num5;
            var   owner = photonView.owner;
            if (RCSettings.teamMode > 0)
            {
                var num = RCextensions.returnIntFromObject(owner.customProperties[PhotonPlayerProperty.RCteam]);
                if (num == 1)
                {
                    GetComponent <ParticleSystem>().startColor = Color.cyan;
                }
                else if (num == 2)
                {
                    GetComponent <ParticleSystem>().startColor = Color.magenta;
                }
                else
                {
                    num2 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombR]);
                    num3 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombG]);
                    num4 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombB]);
                    num5 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombA]);
                    num5 = Mathf.Max(0.5f, num5);
                    GetComponent <ParticleSystem>().startColor = new Color(num2, num3, num4, num5);
                }
            }
            else
            {
                num2 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombR]);
                num3 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombG]);
                num4 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombB]);
                num5 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombA]);
                num5 = Mathf.Max(0.5f, num5);
                GetComponent <ParticleSystem>().startColor = new Color(num2, num3, num4, num5);
            }

            var num6 = RCextensions.returnFloatFromObject(owner.customProperties[PhotonPlayerProperty.RCBombRadius]) * 2f;
            num6 = Mathf.Clamp(num6, 40f, 120f);
            GetComponent <ParticleSystem>().startSize = num6;
        }
    }
Пример #3
0
 public void Start()
 {
     if (base.photonView != null)
     {
         float        num2;
         float        num3;
         float        num4;
         float        num5;
         PhotonPlayer owner = base.photonView.owner;
         if (FengGameManagerMKII.Gamemode.TeamMode != TeamMode.Disabled)
         {
             int num = RCextensions.returnIntFromObject(owner.CustomProperties[PhotonPlayerProperty.RCteam]);
             if (num == 1)
             {
                 base.GetComponent <ParticleSystem>().startColor = Color.cyan;
             }
             else if (num == 2)
             {
                 base.GetComponent <ParticleSystem>().startColor = Color.magenta;
             }
             else
             {
                 num2 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombR]);
                 num3 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombG]);
                 num4 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombB]);
                 num5 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombA]);
                 num5 = Mathf.Max(0.5f, num5);
                 base.GetComponent <ParticleSystem>().startColor = new Color(num2, num3, num4, num5);
             }
         }
         else
         {
             num2 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombR]);
             num3 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombG]);
             num4 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombB]);
             num5 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombA]);
             num5 = Mathf.Max(0.5f, num5);
             base.GetComponent <ParticleSystem>().startColor = new Color(num2, num3, num4, num5);
         }
         float num6 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombRadius]) * 2f;
         num6 = Mathf.Clamp(num6, 40f, 120f);
         base.GetComponent <ParticleSystem>().startSize = num6;
     }
 }
Пример #4
0
 public void Awake()
 {
     if (base.photonView != null)
     {
         float num2;
         float num3;
         float num4;
         base.photonView.observed = this;
         this.correctPlayerPos    = base.transform.position;
         this.correctPlayerRot    = Quaternion.identity;
         PhotonPlayer owner = base.photonView.owner;
         if (RCSettings.teamMode > 0)
         {
             int num = RCextensions.returnIntFromObject(owner.CustomProperties[PhotonPlayerProperty.RCteam]);
             if (num == 1)
             {
                 base.GetComponent <ParticleSystem>().startColor = Color.cyan;
             }
             else if (num == 2)
             {
                 base.GetComponent <ParticleSystem>().startColor = Color.magenta;
             }
             else
             {
                 num2 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombR]);
                 num3 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombG]);
                 num4 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombB]);
                 base.GetComponent <ParticleSystem>().startColor = new Color(num2, num3, num4, 1f);
             }
         }
         else
         {
             num2 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombR]);
             num3 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombG]);
             num4 = RCextensions.returnFloatFromObject(owner.CustomProperties[PhotonPlayerProperty.RCBombB]);
             base.GetComponent <ParticleSystem>().startColor = new Color(num2, num3, num4, 1f);
         }
     }
 }