예제 #1
0
        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);
        }
예제 #2
0
 /// <summary>
 ///     Set a card
 /// </summary>
 /// <param name="card"></param>
 public void SetData(IRuntimeCard card)
 {
     RuntimeData = card;
     OnSetData?.Invoke(StaticData);
 }
예제 #3
0
 /// <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);
 }