UnityEngine.Network.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, int)

Here are the examples of the csharp api UnityEngine.Network.Instantiate(UnityEngine.Object, UnityEngine.Vector3, UnityEngine.Quaternion, int) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

4 Examples 7

19 View Source File : COLOSSAL_TITAN.cs
License : GNU General Public License v3.0
Project Creator : aelariane

public void Update()
    {
        this.healthTime -= Time.deltaTime;
        UpdateLabel();
        if (this.state == "null")
        {
            return;
        }
        if (this.state == "wait")
        {
            this.waitTime -= Time.deltaTime;
            if (this.waitTime <= 0f)
            {
                baseT.position = new Vector3(30f, 0f, 784f);
                //UnityEngine.Object.Instantiate(CacheResources.Load("FX/ThunderCT"), baseT.position + Vectors.up * 350f, Quaternion.Euler(270f, 0f, 0f));
                Pool.Enable("FX/ThunderCT", baseT.position + Vectors.up * 350f, Quaternion.Euler(270f, 0f, 0f));
                IN_GAME_MAIN_CAMERA.MainCamera.flashBlind();
                if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                {
                    this.idle();
                }
                else if ((!FengGameManagerMKII.LAN) ? BasePV.IsMine : base.networkView.isMine)
                {
                    this.idle();
                }
                else
                {
                    this.state = "null";
                }
            }
        }
        else
        {
            if (this.state == "idle")
            {
                if (this.attackPattern == -1)
                {
                    this.slap("r1");
                    this.attackPattern++;
                }
                else if (this.attackPattern == 0)
                {
                    this.attack_sweep(string.Empty);
                    this.attackPattern++;
                }
                else if (this.attackPattern == 1)
                {
                    this.steam();
                    this.attackPattern++;
                }
                else if (this.attackPattern == 2)
                {
                    this.kick();
                    this.attackPattern++;
                }
                else
                {
                    if (this.isSteamNeed || this.hasDie)
                    {
                        this.steam();
                        this.isSteamNeed = false;
                        return;
                    }
                    if (this.myHero == null)
                    {
                        this.findNearestHero();
                    }
                    else
                    {
                        Vector3 vector = this.myHero.transform.position - baseT.position;
                        float current = -Mathf.Atan2(vector.z, vector.x) * 57.29578f;
                        float f = -Mathf.DeltaAngle(current, baseGT.rotation.eulerAngles.y - 90f);
                        this.myDistance = Mathf.Sqrt((this.myHero.transform.position.x - baseT.position.x) * (this.myHero.transform.position.x - baseT.position.x) + (this.myHero.transform.position.z - baseT.position.z) * (this.myHero.transform.position.z - baseT.position.z));
                        float num = this.myHero.transform.position.y - baseT.position.y;
                        if (this.myDistance < 85f && UnityEngine.Random.Range(0, 100) < 5)
                        {
                            this.steam();
                            return;
                        }
                        if (num > 310f && num < 350f)
                        {
                            if (Vector3.Distance(this.myHero.transform.position, baseT.Find("APL1").position) < 40f)
                            {
                                this.slap("l1");
                                return;
                            }
                            if (Vector3.Distance(this.myHero.transform.position, baseT.Find("APL2").position) < 40f)
                            {
                                this.slap("l2");
                                return;
                            }
                            if (Vector3.Distance(this.myHero.transform.position, baseT.Find("APR1").position) < 40f)
                            {
                                this.slap("r1");
                                return;
                            }
                            if (Vector3.Distance(this.myHero.transform.position, baseT.Find("APR2").position) < 40f)
                            {
                                this.slap("r2");
                                return;
                            }
                            if (this.myDistance < 150f && Mathf.Abs(f) < 80f)
                            {
                                this.attack_sweep(string.Empty);
                                return;
                            }
                        }
                        if (num < 300f && Mathf.Abs(f) < 80f && this.myDistance < 85f)
                        {
                            this.attack_sweep("_vertical");
                            return;
                        }
                        int num2 = UnityEngine.Random.Range(0, 7);
                        if (num2 == 0)
                        {
                            this.slap("l1");
                        }
                        else if (num2 == 1)
                        {
                            this.slap("l2");
                        }
                        else if (num2 == 2)
                        {
                            this.slap("r1");
                        }
                        else if (num2 == 3)
                        {
                            this.slap("r2");
                        }
                        else if (num2 == 4)
                        {
                            this.attack_sweep(string.Empty);
                        }
                        else if (num2 == 5)
                        {
                            this.attack_sweep("_vertical");
                        }
                        else if (num2 == 6)
                        {
                            this.steam();
                        }
                    }
                }
                return;
            }
            if (this.state == "attack_sweep")
            {
                if (this.attackCheckTimeA != 0f && ((base.animation["attack_" + this.attackAnimation].normalizedTime >= this.attackCheckTimeA && base.animation["attack_" + this.attackAnimation].normalizedTime <= this.attackCheckTimeB) || (!this.attackChkOnce && base.animation["attack_" + this.attackAnimation].normalizedTime >= this.attackCheckTimeA)))
                {
                    if (!this.attackChkOnce)
                    {
                        this.attackChkOnce = true;
                    }
                    foreach (RaycastHit raycastHit in this.checkHitCapsule(this.checkHitCapsuleStart.position, this.checkHitCapsuleEnd.position, this.checkHitCapsuleR))
                    {
                        GameObject gameObject = raycastHit.collider.gameObject;
                        if (gameObject.CompareTag("Player"))
                        {
                            this.killPlayer(gameObject);
                        }
                        if (gameObject.CompareTag("erenHitbox") && this.attackAnimation == "combo_3" && IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && ((!FengGameManagerMKII.LAN) ? PhotonNetwork.IsMasterClient : Network.isServer))
                        {
                            gameObject.transform.root.gameObject.GetComponent<replacedAN_EREN>().hitByFTByServer(3);
                        }
                    }
                    foreach (RaycastHit raycastHit2 in this.checkHitCapsule(this.checkHitCapsuleEndOld, this.checkHitCapsuleEnd.position, this.checkHitCapsuleR))
                    {
                        GameObject gameObject2 = raycastHit2.collider.gameObject;
                        if (gameObject2.CompareTag("Player"))
                        {
                            this.killPlayer(gameObject2);
                        }
                    }
                    this.checkHitCapsuleEndOld = this.checkHitCapsuleEnd.position;
                }
                if (base.animation["attack_" + this.attackAnimation].normalizedTime >= 1f)
                {
                    this.sweepSmokeObject.GetComponent<ParticleSystem>().enableEmission = false;
                    this.sweepSmokeObject.GetComponent<ParticleSystem>().Stop();
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer)
                    {
                        if (!FengGameManagerMKII.LAN)
                        {
                            BasePV.RPC("stopSweepSmoke", PhotonTargets.Others, new object[0]);
                        }
                    }
                    this.findNearestHero();
                    this.idle();
                    this.playAnimation("idle");
                }
            }
            else if (this.state == "kick")
            {
                if (!this.attackChkOnce && base.animation[this.actionName].normalizedTime >= this.attackCheckTime)
                {
                    this.attackChkOnce = true;
                    this.door_broken.SetActive(true);
                    this.door_closed.SetActive(false);
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer)
                    {
                        if (!FengGameManagerMKII.LAN)
                        {
                            BasePV.RPC("changeDoor", PhotonTargets.OthersBuffered, new object[0]);
                        }
                    }
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer)
                    {
                        if (FengGameManagerMKII.LAN)
                        {
                            Network.Instantiate(CacheResources.Load("FX/boom1_CT_KICK"), baseT.position + baseT.Forward() * 120f + baseT.right * 30f, Quaternion.Euler(270f, 0f, 0f), 0);
                            Network.Instantiate(CacheResources.Load("rock"), baseT.position + baseT.Forward() * 120f + baseT.right * 30f, Quaternion.Euler(0f, 0f, 0f), 0);
                        }
                        else
                        {
                            Optimization.Caching.Pool.NetworkEnable("FX/boom1_CT_KICK", baseT.position + baseT.Forward() * 120f + baseT.right * 30f, Quaternion.Euler(270f, 0f, 0f), 0);
                            Optimization.Caching.Pool.NetworkEnable("rock", baseT.position + baseT.Forward() * 120f + baseT.right * 30f, Quaternion.Euler(0f, 0f, 0f), 0);
                        }
                    }
                    else
                    {
                        Pool.Enable("FX/boom1_CT_KICK", baseT.position + baseT.Forward() * 120f + baseT.right * 30f, Quaternion.Euler(270f, 0f, 0f));
                        //UnityEngine.Object.Instantiate(CacheResources.Load("FX/boom1_CT_KICK"), baseT.position + baseT.Forward() * 120f + baseT.right * 30f, Quaternion.Euler(270f, 0f, 0f));
                        Pool.Enable("rock", baseT.position + baseT.Forward() * 120f + baseT.right * 30f, Quaternion.Euler(0f, 0f, 0f));
                    }
                }
                if (base.animation[this.actionName].normalizedTime >= 1f)
                {
                    this.findNearestHero();
                    this.idle();
                    this.playAnimation("idle");
                }
            }
            else if (this.state == "slap")
            {
                if (!this.attackChkOnce && base.animation["attack_slap_" + this.attackAnimation].normalizedTime >= this.attackCheckTime)
                {
                    this.attackChkOnce = true;
                    GameObject gameObject3;
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer)
                    {
                        if (FengGameManagerMKII.LAN)
                        {
                            gameObject3 = (GameObject)Network.Instantiate(CacheResources.Load("FX/boom1"), this.checkHitCapsuleStart.position, Quaternion.Euler(270f, 0f, 0f), 0);
                        }
                        else
                        {
                            gameObject3 = Optimization.Caching.Pool.NetworkEnable("FX/boom1", this.checkHitCapsuleStart.position, Quaternion.Euler(270f, 0f, 0f), 0);
                        }
                        if (gameObject3.GetComponent<EnemyfxIDcontainer>())
                        {
                            gameObject3.GetComponent<EnemyfxIDcontainer>().replacedanName = base.name;
                        }
                    }
                    else
                    {
                        gameObject3 = Pool.Enable("FX/boom1", this.checkHitCapsuleStart.position, Quaternion.Euler(270f, 0f, 0f));//(GameObject)UnityEngine.Object.Instantiate(CacheResources.Load("FX/boom1"), this.checkHitCapsuleStart.position, Quaternion.Euler(270f, 0f, 0f));
                    }
                    gameObject3.transform.localScale = new Vector3(5f, 5f, 5f);
                }
                if (base.animation["attack_slap_" + this.attackAnimation].normalizedTime >= 1f)
                {
                    this.findNearestHero();
                    this.idle();
                    this.playAnimation("idle");
                }
            }
            else if (this.state == "steam")
            {
                if (!this.attackChkOnce && base.animation[this.actionName].normalizedTime >= this.attackCheckTime)
                {
                    this.attackChkOnce = true;
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer)
                    {
                        if (FengGameManagerMKII.LAN)
                        {
                            Network.Instantiate(CacheResources.Load("FX/colossal_steam"), baseT.position + baseT.Up() * 185f, Quaternion.Euler(270f, 0f, 0f), 0);
                            Network.Instantiate(CacheResources.Load("FX/colossal_steam"), baseT.position + baseT.Up() * 303f, Quaternion.Euler(270f, 0f, 0f), 0);
                            Network.Instantiate(CacheResources.Load("FX/colossal_steam"), baseT.position + baseT.Up() * 50f, Quaternion.Euler(270f, 0f, 0f), 0);
                        }
                        else
                        {
                            Optimization.Caching.Pool.NetworkEnable("FX/colossal_steam", baseT.position + baseT.Up() * 185f, Quaternion.Euler(270f, 0f, 0f), 0);
                            Optimization.Caching.Pool.NetworkEnable("FX/colossal_steam", baseT.position + baseT.Up() * 303f, Quaternion.Euler(270f, 0f, 0f), 0);
                            Optimization.Caching.Pool.NetworkEnable("FX/colossal_steam", baseT.position + baseT.Up() * 50f, Quaternion.Euler(270f, 0f, 0f), 0);
                        }
                    }
                    else
                    {
                        Pool.Enable("FX/colossal_steam", baseT.position + baseT.Forward() * 185f, Quaternion.Euler(270f, 0f, 0f));
                        Pool.Enable("FX/colossal_steam", baseT.position + baseT.Forward() * 303f, Quaternion.Euler(270f, 0f, 0f));
                        Pool.Enable("FX/colossal_steam", baseT.position + baseT.Forward() * 50f, Quaternion.Euler(270f, 0f, 0f));
                        //UnityEngine.Object.Instantiate(CacheResources.Load("FX/colossal_steam"), baseT.position + baseT.Forward() * 185f, Quaternion.Euler(270f, 0f, 0f));
                        //UnityEngine.Object.Instantiate(CacheResources.Load("FX/colossal_steam"), baseT.position + baseT.Forward() * 303f, Quaternion.Euler(270f, 0f, 0f));
                        //UnityEngine.Object.Instantiate(CacheResources.Load("FX/colossal_steam"), baseT.position + baseT.Forward() * 50f, Quaternion.Euler(270f, 0f, 0f));
                    }
                }
                if (base.animation[this.actionName].normalizedTime >= 1f)
                {
                    if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer)
                    {
                        if (FengGameManagerMKII.LAN)
                        {
                            Network.Instantiate(CacheResources.Load("FX/colossal_steam_dmg"), baseT.position + baseT.Up() * 185f, Quaternion.Euler(270f, 0f, 0f), 0);
                            Network.Instantiate(CacheResources.Load("FX/colossal_steam_dmg"), baseT.position + baseT.Up() * 303f, Quaternion.Euler(270f, 0f, 0f), 0);
                            Network.Instantiate(CacheResources.Load("FX/colossal_steam_dmg"), baseT.position + baseT.Up() * 50f, Quaternion.Euler(270f, 0f, 0f), 0);
                        }
                        else
                        {
                            GameObject gameObject4 = Optimization.Caching.Pool.NetworkEnable("FX/colossal_steam_dmg", baseT.position + baseT.Up() * 185f, Quaternion.Euler(270f, 0f, 0f), 0);
                            if (gameObject4.GetComponent<EnemyfxIDcontainer>())
                            {
                                gameObject4.GetComponent<EnemyfxIDcontainer>().replacedanName = base.name;
                            }
                            gameObject4 = Optimization.Caching.Pool.NetworkEnable("FX/colossal_steam_dmg", baseT.position + baseT.Up() * 303f, Quaternion.Euler(270f, 0f, 0f), 0);
                            if (gameObject4.GetComponent<EnemyfxIDcontainer>())
                            {
                                gameObject4.GetComponent<EnemyfxIDcontainer>().replacedanName = base.name;
                            }
                            gameObject4 = Optimization.Caching.Pool.NetworkEnable("FX/colossal_steam_dmg", baseT.position + baseT.Up() * 50f, Quaternion.Euler(270f, 0f, 0f), 0);
                            if (gameObject4.GetComponent<EnemyfxIDcontainer>())
                            {
                                gameObject4.GetComponent<EnemyfxIDcontainer>().replacedanName = base.name;
                            }
                        }
                    }
                    else
                    {
                        Pool.Enable("FX/colossal_steam_dmg", baseT.position + baseT.Forward() * 185f, Quaternion.Euler(270f, 0f, 0f));
                        Pool.Enable("FX/colossal_steam_dmg", baseT.position + baseT.Forward() * 303f, Quaternion.Euler(270f, 0f, 0f));
                        Pool.Enable("FX/colossal_steam_dmg", baseT.position + baseT.Forward() * 50f, Quaternion.Euler(270f, 0f, 0f));
                        //UnityEngine.Object.Instantiate(CacheResources.Load("FX/colossal_steam_dmg"), baseT.position + baseT.Forward() * 185f, Quaternion.Euler(270f, 0f, 0f));
                        //UnityEngine.Object.Instantiate(CacheResources.Load("FX/colossal_steam_dmg"), baseT.position + baseT.Forward() * 303f, Quaternion.Euler(270f, 0f, 0f));
                        //UnityEngine.Object.Instantiate(CacheResources.Load("FX/colossal_steam_dmg"), baseT.position + baseT.Forward() * 50f, Quaternion.Euler(270f, 0f, 0f));
                    }
                    if (this.hasDie)
                    {
                        if (IN_GAME_MAIN_CAMERA.GameType == GameType.Single)
                        {
                            UnityEngine.Object.Destroy(baseG);
                        }
                        else if (FengGameManagerMKII.LAN)
                        {
                            if (base.networkView.isMine)
                            {
                            }
                        }
                        else if (PhotonNetwork.IsMasterClient)
                        {
                            PhotonNetwork.Destroy(BasePV);
                        }
                        FengGameManagerMKII.FGM.GameWin();
                    }
                    this.findNearestHero();
                    this.idle();
                    this.playAnimation("idle");
                }
            }
            else if (this.state == string.Empty)
            {
            }
        }
    }

19 View Source File : COLOSSAL_TITAN.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void callreplacedan(bool special = false)
    {
        if (!special && GameObject.FindGameObjectsWithTag("replacedan").Length > 6)
        {
            return;
        }
        GameObject[] array = GameObject.FindGameObjectsWithTag("replacedanRespawn");
        ArrayList arrayList = new ArrayList();
        foreach (GameObject gameObject in array)
        {
            if (gameObject.transform.parent.name == "replacedanRespawnCT")
            {
                arrayList.Add(gameObject);
            }
        }
        GameObject gameObject2 = (GameObject)arrayList[UnityEngine.Random.Range(0, arrayList.Count)];
        string[] array3 = new string[]
        {
            "replacedAN_VER3.1"
        };
        GameObject gameObject3;
        if (FengGameManagerMKII.LAN)
        {
            gameObject3 = (GameObject)Network.Instantiate(CacheResources.Load(array3[UnityEngine.Random.Range(0, array3.Length)]), gameObject2.transform.position, gameObject2.transform.rotation, 0);
        }
        else
        {
            gameObject3 = Optimization.Caching.Pool.NetworkEnable(array3[UnityEngine.Random.Range(0, array3.Length)], gameObject2.transform.position, gameObject2.transform.rotation, 0);
        }
        if (special)
        {
            GameObject[] array4 = GameObject.FindGameObjectsWithTag("route");
            GameObject gameObject4 = array4[UnityEngine.Random.Range(0, array4.Length)];
            while (gameObject4.name != "routeCT")
            {
                gameObject4 = array4[UnityEngine.Random.Range(0, array4.Length)];
            }
            gameObject3.GetComponent<replacedAN>().SetRoute(gameObject4);
            gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Aberrant, false);
            gameObject3.GetComponent<replacedAN>().activeRadPow = 0;
            gameObject3.GetComponent<replacedAN>().ToCheckPoint((Vector3)gameObject3.GetComponent<replacedAN>().checkPoints[0], 10f);
        }
        else
        {
            float num = 0.7f;
            float num2 = 0.7f;
            if (IN_GAME_MAIN_CAMERA.Difficulty != 0)
            {
                if (IN_GAME_MAIN_CAMERA.Difficulty == 1)
                {
                    num = 0.4f;
                    num2 = 0.7f;
                }
                else if (IN_GAME_MAIN_CAMERA.Difficulty == 2)
                {
                    num = -1f;
                    num2 = 0.7f;
                }
            }
            if (GameObject.FindGameObjectsWithTag("replacedan").Length == 5)
            {
                gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Jumper, false);
            }
            else if (UnityEngine.Random.Range(0f, 1f) >= num)
            {
                if (UnityEngine.Random.Range(0f, 1f) < num2)
                {
                    gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Jumper, false);
                }
                else
                {
                    gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Crawler, false);
                }
            }
            gameObject3.GetComponent<replacedAN>().activeRadPow = 40000;
        }
        if (FengGameManagerMKII.LAN)
        {
            GameObject gameObject5 = (GameObject)Network.Instantiate(CacheResources.Load("FX/FXreplacedanSpawn"), gameObject3.transform.position, Quaternion.Euler(-90f, 0f, 0f), 0);
            gameObject5.transform.localScale = gameObject3.transform.localScale;
        }
        else
        {
            GameObject gameObject6 = Optimization.Caching.Pool.NetworkEnable("FX/FXreplacedanSpawn", gameObject3.transform.position, Quaternion.Euler(-90f, 0f, 0f), 0);
            gameObject6.transform.localScale = gameObject3.transform.localScale;
        }
    }

19 View Source File : COLOSSAL_TITAN.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void callreplacedan(bool special = false)
    {
        if (!special && GameObject.FindGameObjectsWithTag("replacedan").Length > 6)
        {
            return;
        }
        GameObject[] array = GameObject.FindGameObjectsWithTag("replacedanRespawn");
        ArrayList arrayList = new ArrayList();
        foreach (GameObject gameObject in array)
        {
            if (gameObject.transform.parent.name == "replacedanRespawnCT")
            {
                arrayList.Add(gameObject);
            }
        }
        GameObject gameObject2 = (GameObject)arrayList[UnityEngine.Random.Range(0, arrayList.Count)];
        string[] array3 = new string[]
        {
            "replacedAN_VER3.1"
        };
        GameObject gameObject3;
        if (FengGameManagerMKII.LAN)
        {
            gameObject3 = (GameObject)Network.Instantiate(CacheResources.Load(array3[UnityEngine.Random.Range(0, array3.Length)]), gameObject2.transform.position, gameObject2.transform.rotation, 0);
        }
        else
        {
            gameObject3 = Optimization.Caching.Pool.NetworkEnable(array3[UnityEngine.Random.Range(0, array3.Length)], gameObject2.transform.position, gameObject2.transform.rotation, 0);
        }
        if (special)
        {
            GameObject[] array4 = GameObject.FindGameObjectsWithTag("route");
            GameObject gameObject4 = array4[UnityEngine.Random.Range(0, array4.Length)];
            while (gameObject4.name != "routeCT")
            {
                gameObject4 = array4[UnityEngine.Random.Range(0, array4.Length)];
            }
            gameObject3.GetComponent<replacedAN>().SetRoute(gameObject4);
            gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Aberrant, false);
            gameObject3.GetComponent<replacedAN>().activeRad = 0;
            gameObject3.GetComponent<replacedAN>().ToCheckPoint((Vector3)gameObject3.GetComponent<replacedAN>().checkPoints[0], 10f);
        }
        else
        {
            float num = 0.7f;
            float num2 = 0.7f;
            if (IN_GAME_MAIN_CAMERA.Difficulty != 0)
            {
                if (IN_GAME_MAIN_CAMERA.Difficulty == 1)
                {
                    num = 0.4f;
                    num2 = 0.7f;
                }
                else if (IN_GAME_MAIN_CAMERA.Difficulty == 2)
                {
                    num = -1f;
                    num2 = 0.7f;
                }
            }
            if (GameObject.FindGameObjectsWithTag("replacedan").Length == 5)
            {
                gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Jumper, false);
            }
            else if (UnityEngine.Random.Range(0f, 1f) >= num)
            {
                if (UnityEngine.Random.Range(0f, 1f) < num2)
                {
                    gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Jumper, false);
                }
                else
                {
                    gameObject3.GetComponent<replacedAN>().SetAbnormalType(AbnormalType.Crawler, false);
                }
            }
            gameObject3.GetComponent<replacedAN>().activeRad = 200;
        }
        if (FengGameManagerMKII.LAN)
        {
            GameObject gameObject5 = (GameObject)Network.Instantiate(CacheResources.Load("FX/FXreplacedanSpawn"), gameObject3.transform.position, Quaternion.Euler(-90f, 0f, 0f), 0);
            gameObject5.transform.localScale = gameObject3.transform.localScale;
        }
        else
        {
            GameObject gameObject6 = Optimization.Caching.Pool.NetworkEnable("FX/FXreplacedanSpawn", gameObject3.transform.position, Quaternion.Euler(-90f, 0f, 0f), 0);
            gameObject6.transform.localScale = gameObject3.transform.localScale;
        }
    }

19 View Source File : RockScript.cs
License : GNU General Public License v3.0
Project Creator : aelariane

private void Update()
    {
        if (this.disable)
        {
            return;
        }
        this.vv += -Vectors.up * this.g * Time.deltaTime;
        base.transform.position += this.vv * Time.deltaTime;
        base.transform.position += this.vh * Time.deltaTime;
        if (Vector3.Distance(this.desPt, base.transform.position) < 20f || base.transform.position.y < 0f)
        {
            base.transform.position = this.desPt;
            if (IN_GAME_MAIN_CAMERA.GameType == GameType.MultiPlayer && PhotonNetwork.IsMasterClient)
            {
                if (FengGameManagerMKII.LAN)
                {
                    Network.Instantiate(CacheResources.Load("FX/boom1_CT_KICK"), base.transform.position + Vectors.up * 30f, Quaternion.Euler(270f, 0f, 0f), 0);
                }
                else
                {
                    Optimization.Caching.Pool.NetworkEnable("FX/boom1_CT_KICK", base.transform.position + Vectors.up * 30f, Quaternion.Euler(270f, 0f, 0f), 0);
                }
            }
            else
            {
                Pool.Enable("FX/boom1_CT_KICK", base.transform.position + Vectors.up * 30f, Quaternion.Euler(270f, 0f, 0f));//UnityEngine.Object.Instantiate(CacheResources.Load("FX/boom1_CT_KICK"), base.transform.position + Vectors.up * 30f, Quaternion.Euler(270f, 0f, 0f));
            }
            this.disable = true;
        }
    }