Esempio n. 1
0
    public new void Start()
    {
        _actor     = GetComponent <FileDataActor>();
        photonView = GetComponent <PhotonView>();

        if (photonView.IsMine)
        {
            Controller     = this;
            _rigi.bodyType = RigidbodyType2D.Dynamic;
        }
        else
        {
            foreach (var gam in hide_gameObject)
            {
                gam.SetActive(false);
            }
            tag = "Enemy";
            gameObject.layer = LayerMask.NameToLayer("enemy");
        }
        SetModel(JsonMapper.ToObject <ActorModel>(photonView.InstantiationData[0].ToString()));
    }