Ejemplo n.º 1
0
 public void Init(InputClientManager actionManager)
 {
     inputActionManager = actionManager;
     transform.position = inputActionManager.RightHandMid1.position;
     transform.rotation = inputActionManager.RightHandMid1.rotation;
     transform.SetParent(inputActionManager.RightHandMid1);
     inputActionManager.ChangeAnimationMotionType(LEUnitAnimatorManager.AnimationMotionType.STUFF_3);
     handle = GetComponentInChildren <ItemHandleOnObj>();
 }
    protected override void DeSerializeDataInternal(BinaryReader reader)
    {
        int count = reader.ReadInt32();

        for (int i = 0; i < count; i++)
        {
            int  id   = reader.ReadInt32();
            Item item = GameDataManager.Instance.itemDatabase.getItemCopyByID(id);

            GameObject      obj    = Instantiate(item.itemPrefab);
            ItemHandleOnObj handle = obj.GetComponentInChildren <ItemHandleOnObj>();
            handle.ReloadItemInfoFromSave(item, this);

            Debug.Log(reader.ReadString());
        }
    }