示例#1
0
    // Use this for initialization
    void Start()
    {
        if (networkView.isMine)
        {
            ap = setap;
            sp = setsp;
            Instantiate(aphud);
            Instantiate(sphud);
            ch = Instantiate(crosshair) as GameObject;
            ch.transform.position = new Vector3(chx, chy, 0);

            hc = GameObject.Find("HUDHealth(Clone)").GetComponent("HealthCounter") as HealthCounter;
            sc = GameObject.Find("HUDShield(Clone)").GetComponent("ShieldCounter") as ShieldCounter;

            hc.set(ap);
            sc.set(sp);
        }
    }