public virtual void SetData(LoadParcelScenesMessage.UnityParcelScene data) { this.sceneData = data; contentProvider = new ContentProvider(); contentProvider.baseUrl = data.baseUrl; contentProvider.contents = data.contents; contentProvider.BakeHashes(); parcels.Clear(); for (int i = 0; i < sceneData.parcels.Length; i++) { parcels.Add(sceneData.parcels[i]); } if (DCLCharacterController.i != null) { gameObject.transform.position = PositionUtils.WorldToUnityPosition(Utils.GridToWorldPosition(data.basePosition.x, data.basePosition.y)); } OnSetData?.Invoke(data); }
/// <summary> /// Set a card /// </summary> /// <param name="card"></param> public void SetData(IRuntimeCard card) { RuntimeData = card; OnSetData?.Invoke(StaticData); }
/// <summary> /// Set a jewel. /// </summary> /// <param name="jewel"></param> public void SetData(IRuntimeJewel jewel) { RuntimeData = jewel; OnSetData?.Invoke(RuntimeData); }
/// <summary> /// Set a card. /// </summary> /// <param name="character"></param> public void SetData(IRuntimeCharacter character) { RuntimeData = character; OnSetData?.Invoke(StaticData); }