Recruiting Developer C#

BR4DLEY

Web Developer
Jan 2, 2012
328
23
Me.
Here's some code from a game of mine.. which is in c#
Code:
public void Spawn()
    {
        spawned = true;
        Transform spawn = spawns[Random.Range(0, spawns.Length)];
        GameObject pl = PhotonNetwork.Instantiate(PlayerPrefs.GetString("class"), spawn.position, spawn.rotation, 0) as GameObject;
        if (pl != null)
        {
            characterControls cc = pl.GetComponent<characterControls>();
            cc.enabled = true;
            cc.fpsCam.SetActive(true);
            cc.head.gameObject.SetActive(false);
            cc.mesh.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.ShadowsOnly;
            foreach(MeshRenderer accessory in cc.accessories)
            {
                accessory.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.ShadowsOnly;
            }
            cc.pv.RPC("setName", PhotonTargets.AllBuffered, PhotonNetwork.playerName);
            cc.pv.RPC("setPFP", PhotonTargets.AllBuffered, profilePicURL);
        }
    }
    GameObject botToSpawn;
    public void spawnBot(string nm)
    {
        if (GameObject.Find("_Network").GetComponent<PhotonView>().isMine)
        {          
            foreach(GameObject bt in botAi)
            {
                if(bt.name == nm)
                {
                    botToSpawn = bt;
                }
            }
 

Velaski

winner
Aug 4, 2015
562
165
Me.
Here's some code from a game of mine.. which is in c#
Code:
public void Spawn()
    {
        spawned = true;
        Transform spawn = spawns[Random.Range(0, spawns.Length)];
        GameObject pl = PhotonNetwork.Instantiate(PlayerPrefs.GetString("class"), spawn.position, spawn.rotation, 0) as GameObject;
        if (pl != null)
        {
            characterControls cc = pl.GetComponent<characterControls>();
            cc.enabled = true;
            cc.fpsCam.SetActive(true);
            cc.head.gameObject.SetActive(false);
            cc.mesh.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.ShadowsOnly;
            foreach(MeshRenderer accessory in cc.accessories)
            {
                accessory.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.ShadowsOnly;
            }
            cc.pv.RPC("setName", PhotonTargets.AllBuffered, PhotonNetwork.playerName);
            cc.pv.RPC("setPFP", PhotonTargets.AllBuffered, profilePicURL);
        }
    }
    GameObject botToSpawn;
    public void spawnBot(string nm)
    {
        if (GameObject.Find("_Network").GetComponent<PhotonView>().isMine)
        {         
            foreach(GameObject bt in botAi)
            {
                if(bt.name == nm)
                {
                    botToSpawn = bt;
                }
            }
What game is this for
 

Users who are viewing this thread

Top