Beispiel #1
0
        public static IEnumerator CustomPlasma(PlayerScript script)
        {
            canAttack.SetValue(script, false);
            attacking.SetValue(script, true);
            script.StartCoroutine(script.ATKSOUND());
            script.StartCoroutine(script.GunEffects(NebulaCannon.GetID()));
            script.GetComponent <AudioSource>().PlayOneShot((AudioClip)Resources.Load("Au/shoot"), Menuu.soundLevel / 10f);
            script.Animate(4);
            yield return(new WaitForSeconds(0.3f));

            int dmg = NebulaCannon.GetDamage(script);

            if ((bool)hyper.GetValue(script))
            {
                hyper.SetValue(script, false);
                script.HyperBeam();
            }
            if (NebulaCannon.TryCrit(script))
            {
                dmg = NebulaCannon.MultiplyCrit(script, dmg);
                script.GetComponent <AudioSource>().PlayOneShot(script.critSound, Menuu.soundLevel / 10f);
                UnityEngine.Object.Instantiate(script.crit, script.transform.position, Quaternion.identity);
            }

            script.GetComponent <AudioSource>().PlayOneShot((AudioClip)Resources.Load("Au/plasma1"), Menuu.soundLevel / 10f);
            int        num        = InstanceTracker.GameScript.GetFinalStat(3) * 2 + InstanceTracker.GameScript.GetFinalStat(2) / 2;
            Vector3    vector     = Camera.main.ScreenToWorldPoint(Input.mousePosition);
            PackPlasma value      = new PackPlasma(num, vector);
            GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate(Resources.Load("proj/plasma"), script.shot.transform.position, Quaternion.identity);

            gameObject.SendMessage("Plasma2", value);
            script.GetComponent <NetworkView>().RPC("ShootSpecial", RPCMode.Others, new object[]
            {
                1001,
                vector,
                num
            });

            yield return(new WaitForSeconds(0.2f));

            attacking.SetValue(script, false);
            yield return(new WaitForSeconds(0.1f));

            canAttack.SetValue(script, true);
            yield break;
        }