コード例 #1
0
    void Start()
    {
        tmp  = GameObject.Find("TEMP");
        tmp2 = tmp.GetComponent <socketRet>();
        if (!AutoFireForDemo)
        {
            CurrentTarget = null;
        }

        if (LaserFireCenterEmitter != null)
        {
            ParticleSystem.EmissionModule emissionModule = LaserFireCenterEmitter.emission;
            emissionModule.rateOverTime = 0;
        }
        if (TargetHitEmitter != null)
        {
            ParticleSystem.EmissionModule emissionModule = TargetHitEmitter.emission;
            emissionModule.rateOverTime = 0;
        }
        if (InnerLaserLineRender != null)
        {
            InnerLaserLineRender.enabled = false;
        }
        if (OuterLaserLineRender != null)
        {
            OuterLaserLineRender.enabled = false;
        }
    }
コード例 #2
0
        private void Start()
        {
            tmp  = GameObject.Find("TEMP");
            tmp2 = tmp.GetComponent <socketRet>();

            m_ChargeSpeed = (m_MaxLaunchForce - m_MinLaunchForce) / m_MaxChargeTime;
        }
コード例 #3
0
    // Use this for initialization
    void Start()
    {
        tmp          = GameObject.Find("TEMP");
        responseCube = GameObject.Find("responseEffect");
        tmp2         = tmp.GetComponent <socketRet>();
        label0       = GameObject.Find("Turret0").GetComponent <TextMesh>();
        label1       = GameObject.Find("Turret1").GetComponent <TextMesh>();
        label2       = GameObject.Find("Turret2").GetComponent <TextMesh>();
        label3       = GameObject.Find("Turret3").GetComponent <TextMesh>();
        label4       = GameObject.Find("Turret4").GetComponent <TextMesh>();
        label5       = GameObject.Find("Turret5").GetComponent <TextMesh>();
        label6       = GameObject.Find("Turret6").GetComponent <TextMesh>();
        label7       = GameObject.Find("Turret7").GetComponent <TextMesh>();
        label8       = GameObject.Find("Turret8").GetComponent <TextMesh>();
        label9       = GameObject.Find("Turret9").GetComponent <TextMesh>();
        label10      = GameObject.Find("Turret10").GetComponent <TextMesh>();

        SocketManager.Socket.On("go", (data) =>
        {
            seqGoJson d = JsonUtility.FromJson <seqGoJson>(data.Json.args[0].ToString());
            // Debug.Log(d.seq);
            tmp2.SocketRetValue = d.seq;
        });
        SocketManager.Socket.On("serverResponse", (data) =>
        {
            Debug.Log("serverResponse " + data.Json.args[0]);
            serverResponse d = JsonUtility.FromJson <serverResponse>(data.Json.args[0].ToString());
            Debug.Log("d.seq " + d.seq + "d.TF " + d.tf);
            tmp2.SocketRetTFseq = d.seq;
            tmp2.SocketRetTF    = d.tf;
        });
        SocketManager.Socket.On("updateScore", (data) =>
        {
            seqScoreJson d = JsonUtility.FromJson <seqScoreJson>(data.Json.args[0].ToString());
            buffer.Add(d.aScore); //갱신된 DB를 주면 됨
            buffer.Add(d.bScore);
            buffer.Add(d.cScore);
            buffer.Add(d.dScore);
            buffer.Add(d.eScore);
            buffer.Add(d.fScore);
            buffer.Add(d.gScore);
            buffer.Add(d.hScore);
            buffer.Add(d.iScore);
            buffer.Add(d.jScore);
            buffer.Add(d.kScore);
        });
    }