new UniTask instead of task
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -2729,7 +2729,7 @@ BoxCollider:
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: -0.2, y: 0.19, z: 0.23}
|
||||
m_Size: {x: 0.2, y: 0.19, z: 0.23}
|
||||
m_Center: {x: -0.06, y: -0.1, z: 0.06}
|
||||
--- !u!1 &535029578
|
||||
GameObject:
|
||||
@@ -4096,7 +4096,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 749553635}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.38268346, y: 0.000000022481224, z: -0.0000000093120285, w: 0.92387956}
|
||||
m_LocalRotation: {x: 0.38268346, y: -0.000000022481213, z: 0.000000009312023, w: 0.92387956}
|
||||
m_LocalPosition: {x: 29.11, y: 5, z: -5}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
@@ -4628,7 +4628,7 @@ Transform:
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 835327588}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0.38268346, y: 0.000000022481224, z: -0.0000000093120285, w: 0.92387956}
|
||||
m_LocalRotation: {x: 0.38268346, y: -0.000000022481213, z: 0.000000009312023, w: 0.92387956}
|
||||
m_LocalPosition: {x: 29.11, y: 5, z: -5}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
|
||||
@@ -2429,6 +2429,16 @@ PrefabInstance:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 547396650470213814, guid: 0a46dd346180abf4084703e1511257a6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 547396650470213814, guid: 0a46dd346180abf4084703e1511257a6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -0.15
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1449038900958774939, guid: 0a46dd346180abf4084703e1511257a6,
|
||||
type: 3}
|
||||
propertyPath: m_Center.y
|
||||
@@ -2497,7 +2507,7 @@ PrefabInstance:
|
||||
- target: {fileID: 8971066017072020675, guid: 0a46dd346180abf4084703e1511257a6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: -1.03
|
||||
value: -1.28
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8971066017072020675, guid: 0a46dd346180abf4084703e1511257a6,
|
||||
type: 3}
|
||||
@@ -2507,7 +2517,7 @@ PrefabInstance:
|
||||
- target: {fileID: 8971066017072020675, guid: 0a46dd346180abf4084703e1511257a6,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: -2.5
|
||||
value: -2.3
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8971066017072020675, guid: 0a46dd346180abf4084703e1511257a6,
|
||||
type: 3}
|
||||
@@ -4042,7 +4052,7 @@ NavMeshObstacle:
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1620541863}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
serializedVersion: 3
|
||||
m_Shape: 1
|
||||
m_Extents: {x: 0.005, y: 0.05, z: 0.05}
|
||||
|
||||
Binary file not shown.
+3
-3
@@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e4f5296f2d262a4f99dc18aad623ea0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
guid: ccd22d3124353ba4a85f67df71ad9fc6
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 23800000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
public abstract class BaseInteractableObject : MonoBehaviour
|
||||
@@ -31,7 +31,7 @@ public abstract class BaseInteractableObject : MonoBehaviour
|
||||
};
|
||||
}
|
||||
|
||||
public async Task<InteractionStatus> ShowPopupMenu(Player player)
|
||||
public async UniTask<InteractionStatus> ShowPopupMenu(Player player)
|
||||
{
|
||||
_player = player;
|
||||
PrepareMenuActions();
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Assets.Scripts.Interfaces
|
||||
namespace Assets.Scripts.Interfaces
|
||||
{
|
||||
public interface IStat
|
||||
{
|
||||
|
||||
@@ -117,7 +117,7 @@ public class Player : BaseCharacter
|
||||
{
|
||||
containerItem.transform.parent = _holdPoint;
|
||||
containerItem.transform.localPosition = Vector3.zero;
|
||||
_containerItem = containerItem;
|
||||
//_containerItem = containerItem;
|
||||
}
|
||||
public ContainerItem GetContainerItem()
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
@@ -10,10 +10,10 @@ public class RadialMenuItem : MonoBehaviour
|
||||
[SerializeField]
|
||||
private Button _radialMenuItemPrefab;
|
||||
private Dictionary<RadialMenuActions, RadialMenuActionDescription> _actions;
|
||||
TaskCompletionSource<RadialMenuActions> tcs = new TaskCompletionSource<RadialMenuActions>();
|
||||
UniTaskCompletionSource<RadialMenuActions> tcs = new UniTaskCompletionSource<RadialMenuActions>();
|
||||
|
||||
|
||||
public Task<RadialMenuActions> ShowButtons(RadialMenuItem popupMenu, Dictionary<RadialMenuActions, RadialMenuActionDescription> actions)
|
||||
public UniTask<RadialMenuActions> ShowButtons(RadialMenuItem popupMenu, Dictionary<RadialMenuActions, RadialMenuActionDescription> actions)
|
||||
{
|
||||
|
||||
_actions = actions;
|
||||
@@ -42,13 +42,14 @@ public class RadialMenuItem : MonoBehaviour
|
||||
{
|
||||
b.onClick.AddListener(() =>
|
||||
{
|
||||
tcs.SetResult(_actions.ElementAt(buttonNumber).Key);
|
||||
tcs.TrySetResult(_actions.ElementAt(buttonNumber).Key);
|
||||
Close();
|
||||
});
|
||||
}
|
||||
|
||||
public void CancelAndClose()
|
||||
{
|
||||
tcs.TrySetCanceled();
|
||||
Close();
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
|
||||
public class UISystem : MonoBehaviour
|
||||
@@ -33,7 +33,7 @@ public class UISystem : MonoBehaviour
|
||||
jobSelector.ShowJobSelectionDialog(title, onCancel, onConfirm);
|
||||
}
|
||||
|
||||
public async Task<RadialMenuActions> ShowItemPopupMenu(Dictionary<RadialMenuActions, RadialMenuActionDescription> actions)
|
||||
public async UniTask<RadialMenuActions> ShowItemPopupMenu(Dictionary<RadialMenuActions, RadialMenuActionDescription> actions)
|
||||
{
|
||||
_popupMenu = Instantiate(_radialMenuItemPrefab);
|
||||
_popupMenu.transform.transform.SetParent(transform, false);
|
||||
|
||||
Reference in New Issue
Block a user