示例#1
0
        protected override void Start()
        {
            Debug.Log(gameObject.name + " " + gameObject.layer.ToString());

            base.Start();
            weaponH = GetComponent <WeaponHandler>();

            if (Camera2D == null)
            {
                Camera2D = GameObject.FindObjectOfType <Camera2DController>();
            }

            if (PhotonView.isMine)
            {
                m_camera2DFollowBehaviour        = Camera2D.transform.GetComponent <FollowObjectBehaviour> ();
                m_camera2DFollowBehaviour.Target = transform;
            }

            if (!PhotonView.isMine)
            {
                gameObject.transform.GetChild(2).GetComponent <SpriteRenderer> ().enabled = false;
            }
        }