Commit fb16227f authored by 18류지석's avatar 18류지석

Merge branch 'item'

parents 1a5766ca 89782746
......@@ -361,6 +361,9 @@ MonoBehaviour:
vanishLayer:
serializedVersion: 2
m_Bits: 0
stopLayer:
serializedVersion: 2
m_Bits: 0
attackCombo:
--- !u!114 &114574072693989902
MonoBehaviour:
......@@ -399,8 +402,6 @@ MonoBehaviour:
playingSkill: 0
originComboTime: 1
comboTime: 1
time: {fileID: 0}
combo: {fileID: 0}
comboArray:
StartTime: 0
anim: {fileID: 95992411616135034}
......@@ -409,6 +410,7 @@ MonoBehaviour:
- {fileID: 7400000, guid: b1bf5cd583e214e448b83335f6c2d7a6, type: 2}
- {fileID: 7400000, guid: b7ca0c87c2a73cb4e939b4d06abd4217, type: 2}
- {fileID: 7400000, guid: 9133e696bcae7294c86f6702b20b4ae7, type: 2}
comboUI: {fileID: 0}
--- !u!114 &114906702720267008
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -455,7 +457,7 @@ SpriteRenderer:
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: -2078941185
m_SortingLayer: 6
m_SortingLayer: 8
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 92d166e0c2a85a14facee45f5a5a8444, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
......
......@@ -69,6 +69,7 @@ MonoBehaviour:
vibrationVariable: 0.1
droppedLifeStonePrefab: {fileID: 1149595688849768, guid: 8255a117a93935941b32b4aed9b299a0,
type: 2}
lifeStoneUI: {fileID: 0}
frameBorder: 0.2
popoutStrengthMultiplier: 9
popoutTime: 0.1
......@@ -149,23 +149,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1192259543566692
GameObject:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 224718253185442684}
- component: {fileID: 222728410615879860}
- component: {fileID: 114201015544643294}
m_Layer: 5
m_Name: comboString
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1202151931231562
GameObject:
m_ObjectHideFlags: 1
......@@ -412,23 +395,6 @@ GameObject:
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1476757860294118
GameObject:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 224363839195006936}
- component: {fileID: 222534792739815650}
- component: {fileID: 114177053965581520}
m_Layer: 5
m_Name: comboTime
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1515372648492700
GameObject:
m_ObjectHideFlags: 1
......@@ -1261,39 +1227,6 @@ MonoBehaviour:
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Destroy Number
--- !u!114 &114177053965581520
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1476757860294118}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 20
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: New Text
--- !u!114 &114196760162585638
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -1441,41 +1374,6 @@ MonoBehaviour:
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!114 &114201015544643294
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1192259543566692}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'test
'
--- !u!114 &114213890665286158
MonoBehaviour:
m_ObjectHideFlags: 1
......@@ -3565,13 +3463,6 @@ CanvasRenderer:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1931804548930462}
m_CullTransparentMesh: 0
--- !u!222 &222534792739815650
CanvasRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1476757860294118}
m_CullTransparentMesh: 0
--- !u!222 &222557486963309136
CanvasRenderer:
m_ObjectHideFlags: 1
......@@ -3628,13 +3519,6 @@ CanvasRenderer:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1080262509988266}
m_CullTransparentMesh: 0
--- !u!222 &222728410615879860
CanvasRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1192259543566692}
m_CullTransparentMesh: 0
--- !u!222 &222776509415662164
CanvasRenderer:
m_ObjectHideFlags: 1
......@@ -4026,24 +3910,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!224 &224363839195006936
RectTransform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1476757860294118}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 224395958577644168}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1391.8002, y: -65}
m_SizeDelta: {x: 447.59998, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224388504707880396
RectTransform:
m_ObjectHideFlags: 1
......@@ -4078,8 +3944,6 @@ RectTransform:
- {fileID: 224071041299093070}
- {fileID: 224804297962416264}
- {fileID: 224008356030171754}
- {fileID: 224718253185442684}
- {fileID: 224363839195006936}
m_Father: {fileID: 4884929250924374}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -4442,24 +4306,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224718253185442684
RectTransform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1192259543566692}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 224395958577644168}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 1391, y: -122.100006}
m_SizeDelta: {x: 449.2, y: 84.20001}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224719946011532306
RectTransform:
m_ObjectHideFlags: 1
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1095428380981576}
m_IsPrefabAsset: 1
--- !u!1 &1095428380981576
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 224950667710839896}
- component: {fileID: 222825601916116362}
- component: {fileID: 114195692063160650}
m_Layer: 5
m_Name: CharPrefab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &114195692063160650
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1095428380981576}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &222825601916116362
CanvasRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1095428380981576}
m_CullTransparentMesh: 0
--- !u!224 &224950667710839896
RectTransform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1095428380981576}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
fileFormatVersion: 2
guid: 56ca0b4beca882947a7267a94985352b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_SourcePrefab: {fileID: 0}
m_RootGameObject: {fileID: 1379113144309236}
m_IsPrefabAsset: 1
--- !u!1 &1379113144309236
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 224473505326681690}
- component: {fileID: 114835525296742934}
m_Layer: 5
m_Name: ComboUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1573367569156034
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 224686579988098898}
m_Layer: 5
m_Name: CharUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1688191540496162
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 6
m_Component:
- component: {fileID: 224756934921147816}
- component: {fileID: 222456733401175092}
- component: {fileID: 114480143646333180}
m_Layer: 5
m_Name: TimeUI
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &114480143646333180
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1688191540496162}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 0}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114835525296742934
MonoBehaviour:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1379113144309236}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0296171c22d97e64baf3fa3893e42f81, type: 3}
m_Name:
m_EditorClassIdentifier:
charUI: {fileID: 1573367569156034}
timeUI: {fileID: 1688191540496162}
charPrefab: {fileID: 1095428380981576, guid: 56ca0b4beca882947a7267a94985352b, type: 2}
normalCombo:
- {fileID: 21300000, guid: 0f9aa2df06e79a64d8981a956eb12226, type: 3}
- {fileID: 21300000, guid: 8a73c5ced4d09b74f89078836b9bd890, type: 3}
- {fileID: 21300000, guid: eff9d90dcca182243875912722e0cec7, type: 3}
charSpaceR: 0.4
--- !u!222 &222456733401175092
CanvasRenderer:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1688191540496162}
m_CullTransparentMesh: 0
--- !u!224 &224473505326681690
RectTransform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1379113144309236}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 224686579988098898}
- {fileID: 224756934921147816}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 429}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224686579988098898
RectTransform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1573367569156034}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 224473505326681690}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -1}
m_SizeDelta: {x: 100, y: 58}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224756934921147816
RectTransform:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1688191540496162}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 224473505326681690}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 45.5}
m_SizeDelta: {x: 100, y: 10}
m_Pivot: {x: 0.5, y: 0.5}
fileFormatVersion: 2
guid: 51507e73c8b2b094e8299991dfe7fe46
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
fileFormatVersion: 2
guid: b14e5a385d9465448931ccf15d2518e9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 100100000
userData:
assetBundleName:
assetBundleVariant:
......@@ -114,7 +114,10 @@ MonoBehaviour:
m_Bits: 65536
vanishLayer:
serializedVersion: 2
m_Bits: 65792
m_Bits: 65536
stopLayer:
serializedVersion: 2
m_Bits: 256
attackCombo:
--- !u!114 &114988624070961888
MonoBehaviour:
......
......@@ -2,7 +2,7 @@
using System.Collections.Generic;
using UnityEngine;
public class AttackProperty : MonoBehaviour{
public class AttackProperty : MonoBehaviour {
public float damage = 0;
public float knockBackMultiplier = 1f;
public float[] debuffTime = new float[(int)EnemyDebuffCase.END_POINTER];
......@@ -11,6 +11,7 @@ public class AttackProperty : MonoBehaviour{
InventoryManager inventoryManager;
public LayerMask enemyLayer;
public LayerMask vanishLayer;
public LayerMask stopLayer;
public string attackCombo;
private void Awake()
......@@ -54,9 +55,21 @@ public class AttackProperty : MonoBehaviour{
effectManager.StartEffect(0, tmpBounds, collision.bounds);
}
if(projectileType == 1 && (vanishLayer == (vanishLayer | 1 << collision.gameObject.layer)))
if (projectileType == 1 && (vanishLayer == (vanishLayer | 1 << collision.gameObject.layer)))
{
Destroy(gameObject);
}
if (projectileType == 1 && (stopLayer == (stopLayer | 1 << collision.gameObject.layer)))
{
GetComponent<Rigidbody2D>().velocity = Vector2.zero;
GetComponent<Collider2D>().enabled = false;
StartCoroutine(WaitVanish(10f));
}
}
IEnumerator WaitVanish(float time)
{
yield return new WaitForSeconds(time);
Destroy(gameObject);
}
}
......@@ -9,12 +9,12 @@ public class PlayerAttack : MonoBehaviour {
private bool comboEndDelay = true;
public float originComboTime;
public float comboTime;
public Text time, combo;
public string comboArray;
public float StartTime;
public Animator anim;
public AnimatorOverrideController aoc;
public AnimationClip[] normalAttack = new AnimationClip[3];
public ComboUI comboUI;
InventoryManager inventoryManager;
LifeStoneManager lifeStoneManager;
......@@ -65,36 +65,18 @@ public class PlayerAttack : MonoBehaviour {
public void SetComboText()
{
string conString = "";
if (comboArray.Equals(""))
{
combo.text = "";
return;
}
conString += comboArray[0];
for (int i = 1; i < comboArray.Length; i++)
conString += " " + comboArray[i];
combo.text = conString;
comboUI.SetCombo(comboArray);
}
public void SetTimeText(float fullTime, float currentTime)
{
if (comboTimeOn)
{
for (int i = 0; i < 20; i++)
{
if (currentTime / fullTime < (i + 1) * 0.05f)
{
string str = "";
for (int j = 0; j < i + 1; j++) str += "-";
time.text = str;
break;
}
}
comboUI.SetTime(currentTime, fullTime);
}
else
{
time.text = "";
comboUI.SetTime();
}
}
IEnumerator ComboEndDelay()
......@@ -115,7 +97,12 @@ public class PlayerAttack : MonoBehaviour {
}
IEnumerator ComboTextReset()
{
yield return new WaitForSeconds(1.5f);
for(float timer = 0f; timer < 1.5f; timer += Time.deltaTime)
{
yield return null;
if (playingSkill) break;
}
if(comboArray.Equals("") && !playingSkill)
SetComboText();
}
IEnumerator SkillEndCoroutine()
......
......@@ -11,6 +11,7 @@ public abstract class Addon {
public Sprite highlight;
public Vector2 sizeInventory;
public string addonDescription;
public string addonInfo;
public Addon()
{
......@@ -25,6 +26,7 @@ public abstract class Addon {
highlight = null;
sizeInventory = new Vector2(0, 0);
addonDescription = null;
addonInfo = null;
}
public virtual float DamageAdder(PlayerAttackInfo attackInfo, Enemy enemyInfo, string combo)
{
......
......@@ -3,14 +3,17 @@ using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class AddonDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerClickHandler
public class AddonDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDragHandler, IPointerClickHandler, IPointerEnterHandler, IPointerExitHandler
{
public int num;
InventoryUI ui;
InventoryManager manager;
Transform addonGroup, discardBin;
bool pointerOn;
void Start()
{
pointerOn = false;
ui = GameObject.Find("InventoryCanvas").GetComponent<InventoryUI>();
manager = InventoryManager.Instance;
addonGroup = ui.gameObject.transform.Find("AddonGroup");
......@@ -18,15 +21,20 @@ public class AddonDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDra
}
public void OnBeginDrag(PointerEventData eventData)
{
pointerOn = false;
if (eventData.button == PointerEventData.InputButton.Left)
transform.SetAsLastSibling();
}
public void OnDrag(PointerEventData eventData)
{
if (eventData.button == PointerEventData.InputButton.Left)
transform.position = Input.mousePosition;
}
public void OnEndDrag(PointerEventData eventData)
{
if (eventData.button == PointerEventData.InputButton.Left)
{
if (CheckBetween(Input.mousePosition, discardBin.position, discardBin.GetComponent<RectTransform>().sizeDelta))
{
......@@ -56,8 +64,11 @@ public class AddonDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDra
}
manager.SetOnPosition();
}
}
public void OnPointerClick(PointerEventData eventData)
{
if (eventData.button == PointerEventData.InputButton.Right)
{
if (num < 9)
{
......@@ -73,8 +84,41 @@ public class AddonDrag : MonoBehaviour, IBeginDragHandler, IDragHandler, IEndDra
manager.DetachAddon(ui.selectedItem, (AddonType)(num - 9));
manager.SetOnPosition();
}
}
public void OnPointerEnter(PointerEventData eventData)
{
pointerOn = true;
StartCoroutine(AddonInfoReveal());
}
public void OnPointerExit(PointerEventData eventData)
{
pointerOn = false;
}
IEnumerator AddonInfoReveal()
{
if (num < 9)
{
for (float timer = 0; timer < 0.5f; timer += Time.deltaTime)
{
yield return null;
if (!pointerOn) yield break;
}
ui.SetAddonInfo(num);
while (pointerOn)
{
yield return null;
}
ui.SetAddonInfo();
}
}
bool CheckBetween(Vector3 mouse, Vector3 center, Vector2 size)
{
return Mathf.Abs(mouse.x - center.x) <= size.x / 2f && Mathf.Abs(mouse.y - center.y) <= size.y / 2f;
}
}
......@@ -15,6 +15,8 @@ public class CoollyPride : Addon
sprite = Resources.Load<Sprite>("Sprites/Addons/Coolly Pride"); ;
highlight = Resources.Load<Sprite>("Sprites/Addons/Coolly Pride"); ;
sizeInventory = new Vector2(80, 80);
addonDescription = "꺼지지 않을 것 처럼 타올랐지만, 이제는 완전히 식어버린 차숀의 긍지.";
addonInfo = "기본 피해량이 4 미만이면 적을 2초간 빙결시킵니다.";
}
public override float[] DebuffAdder(PlayerAttackInfo attackInfo, Enemy enemyInfo, string combo)
......
......@@ -15,6 +15,8 @@ public class GlowingHerb : Addon
sprite = Resources.Load<Sprite>("Sprites/Addons/Glowing Herb"); ;
highlight = Resources.Load<Sprite>("Sprites/Addons/Glowing Herb"); ;
sizeInventory = new Vector2(80, 80);
addonDescription = "활활 타오르며 매콤한 맛이 날 것 같지만 평범하게 쓰다. - 하부 료진";
addonInfo = "타격시 적을 3초간 화상 상태로 만듭니다.";
}
public override float[] DebuffAdder(PlayerAttackInfo attackInfo, Enemy enemyInfo, string combo)
......
......@@ -17,6 +17,8 @@ public class Gluttony : Addon
highlight = Resources.Load<Sprite>("Sprites/Addons/parchment piece"); ;
sizeInventory = new Vector2(80, 80);
lifeStoneManager = LifeStoneManager.Instance;
addonDescription = "식욕은 누구에게나 존재한다. - 토미 다라바.";
addonInfo = "적을 처치하면 생명석이 1개 회복됩니다.";
}
public override void OtherEffect(PlayerAttackInfo attackInfo, Enemy enemyInfo, string combo)
{
......
......@@ -16,6 +16,7 @@ public class ParchmentPiece : Addon
highlight = Resources.Load<Sprite>("Sprites/Addons/parchment piece_border"); ;
sizeInventory = new Vector2(70, 77.5f);
addonDescription = "쓸모없는 애드온";
addonInfo = "피해량이 3 미만이면 피해량이 100% 증가합니다.";
}
public override float DamageMultiplier(PlayerAttackInfo attackInfo, Enemy enemyInfo, string combo)
{
......
......@@ -145,6 +145,11 @@ public class InventoryManager : Singleton<InventoryManager> {
{
GameObject tmpItem = Instantiate(droppedPrefab);
tmpItem.GetComponent<DroppedItem>().Init((Item)System.Activator.CreateInstance(System.Type.GetType(str)), pos);
for (int i = 0; i < 4; i++)
if (itemPool[i].Contains(str))
itemPool[i].Remove(str);
tmpItem.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
PopoutGenerator(tmpItem, popoutStrength);
}
......@@ -183,6 +188,11 @@ public class InventoryManager : Singleton<InventoryManager> {
{
GameObject tmpItem = Instantiate(droppedPrefab);
tmpItem.GetComponent<DroppedItem>().Init((Addon)System.Activator.CreateInstance(System.Type.GetType(str)), pos);
for (int i = 0; i < 4; i++)
if (addonPool[i].Contains(str))
addonPool[i].Remove(str);
tmpItem.transform.SetParent(MapManager.currentRoom.roomInGame.transform);
PopoutGenerator(tmpItem, popoutStrength);
}
......
......@@ -32,12 +32,18 @@ public class InventoryUI : MonoBehaviour {
public GameObject[] comboCharPrefab;
public GameObject[] comboNameFrame;
public float pixelBetweenChar;
public GameObject addonInfoPrefab;
GameObject[,] comboChars = new GameObject[3, 8];
GameObject[] infoAddons;
GameObject addonInfo;
public int selectedItem = -1;
string[] qualityString = new string[4] { "습작", "범작", "수작", "걸작" };
InventoryManager inventoryManager;
void Awake () {
inventoryManager = InventoryManager.Instance;
items = new GameObject[9];
addons = new GameObject[9];
infoAddons = new GameObject[4];
......@@ -71,7 +77,38 @@ public class InventoryUI : MonoBehaviour {
}
infoSpace.transform.Find("Frame").gameObject.SetActive(false);
addonInfo = Instantiate(addonInfoPrefab, transform);
addonInfo.SetActive(false);
}
public void SetAddonInfo()
{
addonInfo.SetActive(false);
}
public void SetAddonInfo(int addonNum)
{
if (addons[addonNum].activeSelf)
{
addonInfo.SetActive(true);
addonInfo.transform.position = addonCell[addonNum].transform.position + new Vector3(0, 200, 0);
addonInfo.transform.position += new Vector3(-addonInfo.transform.position.x + Mathf.Min(addonInfo.transform.position.x, 1650), 0, 0);
Addon currentAddon = inventoryManager.addonList[addonNum];
GameObject tmpObj = addonInfo.transform.Find("AddonPrefab").gameObject;
tmpObj.GetComponent<Image>().sprite = addonFrameQuality[(int)currentAddon.type * 4 + (int)currentAddon.quality];
tmpObj.transform.Find("Sprite").gameObject.GetComponent<Image>().sprite = currentAddon.sprite;
tmpObj.transform.Find("Sprite").gameObject.GetComponent<RectTransform>().sizeDelta = currentAddon.sizeInventory;
tmpObj.SetActive(true);
addonInfo.transform.Find("Quality").GetComponent<Text>().text = qualityString[(int)currentAddon.quality];
addonInfo.transform.Find("Name").GetComponent<Text>().text = currentAddon.name;
addonInfo.transform.Find("Description").GetComponent<Text>().text = currentAddon.addonDescription;
addonInfo.transform.Find("Info").GetComponent<Text>().text = currentAddon.addonInfo;
}
}
public void SetOnPosition(List<Item> itemList, List<Addon> addonList)
{
for(int i=0; i<itemList.Count; i++)
......@@ -151,6 +188,7 @@ public class InventoryUI : MonoBehaviour {
infoAddonsFrame[i].transform.Find("Quality").GetComponent<Text>().text = qualityString[(int)itemList[selectedItem].addons[i].quality];
infoAddonsFrame[i].transform.Find("Name").GetComponent<Text>().text = itemList[selectedItem].addons[i].name;
infoAddonsFrame[i].transform.Find("Description").GetComponent<Text>().text = itemList[selectedItem].addons[i].addonDescription;
infoAddonsFrame[i].transform.Find("Info").GetComponent<Text>().text = itemList[selectedItem].addons[i].addonInfo;
}
......
......@@ -9,7 +9,7 @@ public class Baculus : Item
{
public override void Declare()
{
id = 15; name = "Baculus";
id = 15; name = "바쿨루스";
quality = ItemQuality.Ordinary;
skillNum = 2;
combo = new string[3] { "BCB", "ACBC", "" };
......@@ -20,5 +20,7 @@ public class Baculus : Item
animation[1] = Resources.Load<AnimationClip>("Animations/baculusAttack2");
animation[2] = null;
sizeInventory = new Vector2(90, 160);
itemInfo = "신을 숭배하는 자들이 들고 있던 청백색의 주교 지팡이. 영험한 힘이 느껴진다.";
comboName = new string[3] { "기도", "징벌", "" };
}
}
......@@ -11,7 +11,7 @@ public class Bow : Item {
public override void Declare()
{
id = 2; name = "bow";
id = 2; name = "";
quality = ItemQuality.Study;
skillNum = 2;
combo = new string[3] { "BB", "BC", "" };
......@@ -22,6 +22,8 @@ public class Bow : Item {
animation[1] = Resources.Load<AnimationClip>("Animations/bowAttack2");
animation[2] = null;
sizeInventory = new Vector2(137.5f, 137.5f);
itemInfo = "단순한 나무활. 군더더기 없는 깔끔한 모습이지만 금방이라도 부셔질 듯이 조잡한 것을 보니 싸구려 인듯 하다.";
comboName = new string[3] { "쏘기", "위로 쏘기", "" };
player = GameObject.Find("Player");
arrow = Resources.Load<GameObject>("Prefabs/Projectiles/bow_arrow");
......
......@@ -9,7 +9,7 @@ public class Dagger : Item
{
public override void Declare()
{
id = 1; name = "dagger";
id = 1; name = "단검(Sweet Sword)";
quality = ItemQuality.Study;
skillNum = 2;
combo = new string[3] { "A", "AA", "" };
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
/// <summary>
/// 아이템명: 감전봉
/// 번호: 52
/// </summary>
public class ElectricShockRod : Item {
public override void Declare()
{
id = 52; name = "감전봉";
quality = ItemQuality.Masterpiece;
skillNum = 2;
combo = new string[3] { "ABA", "CBABB", "" };
attachable = new bool[4] { false, false, true, true };
sprite = Resources.Load<Sprite>("Sprites/Items/electric shock rod");
highlight = Resources.Load<Sprite>("Sprites/Items/electric shock rod");
animation[0] = Resources.Load<AnimationClip>("Animations/electricShockRodAttack1");
animation[1] = Resources.Load<AnimationClip>("Animations/electricShockRodAttack2");
animation[2] = null;
sizeInventory = new Vector2(90, 160);
itemInfo = "몸이 타는 것 같은 수준으로 아프다. 명령을 내릴 때 효과적일 것 같다.";
comboName = new string[3] { "충전", "방전", "" };
}
}
fileFormatVersion: 2
guid: bb06bbbb186c681479b2784047d9df19
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -9,7 +9,7 @@ public class ExplosionGloves : Item
{
public override void Declare()
{
id = 21; name = "explosion gloves";
id = 21; name = "폭탄마의 장갑";
quality = ItemQuality.Ordinary;
skillNum = 2;
combo = new string[3] { "CAC", "CA", "" };
......
......@@ -9,7 +9,7 @@ public class Morgenstern : Item
{
public override void Declare()
{
id = 16; name = "Baculus";
id = 16; name = "모닝스타";
quality = ItemQuality.Superior;
skillNum = 2;
combo = new string[3] { "BBCAA", "BBB", "" };
......
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ComboUI : MonoBehaviour {
public GameObject charUI;
public GameObject timeUI;
public GameObject charPrefab;
public Sprite[] normalCombo = new Sprite[3];
public float charSpaceR;
float timeUILength;
float charSpace;
GameObject[] charObj;
string currentCombo;
void Awake () {
RectTransform rtt = timeUI.GetComponent<RectTransform>();
timeUILength = rtt.sizeDelta.x;
rtt.sizeDelta = new Vector2(0, rtt.sizeDelta.y);
charObj = new GameObject[8];
for (int i = 0; i < 8; i++)
{
charObj[i] = Instantiate(charPrefab, charUI.transform);
charObj[i].SetActive(false);
}
currentCombo = "";
charSpace = charUI.GetComponent<RectTransform>().sizeDelta.y * charSpaceR;
}
public void SetCombo(string combo)
{
for(int i=0; i<8; i++)
{
if(combo.Length <= i && currentCombo.Length <= i)
{
break;
}
else if(combo.Length <= i)
{
charObj[i].SetActive(false);
}
else
{
Sprite currentSprite = normalCombo[combo[i] - 'A'];
charObj[i].SetActive(true);
charObj[i].GetComponent<Image>().sprite = currentSprite;
charObj[i].GetComponent<RectTransform>().sizeDelta = new Vector2(
currentSprite.bounds.extents.x / currentSprite.bounds.extents.y * charUI.GetComponent<RectTransform>().sizeDelta.y,
charUI.GetComponent<RectTransform>().sizeDelta.y);
charObj[i].transform.localPosition = new Vector3((i==0) ? 0 : charObj[i-1].transform.localPosition.x + charObj[i-1].GetComponent<RectTransform>().sizeDelta.x / 2f + charObj[i].GetComponent<RectTransform>().sizeDelta.x / 2f + charSpace, 0, 0);
}
}
if (combo.Length > 0)
{
Vector3 shift = new Vector3((charObj[0].transform.position.x - charObj[combo.Length - 1].transform.position.x)/2f, 0, 0);
for (int i = 0; i < 8; i++)
{
if (charObj[i].activeSelf)
{
charObj[i].transform.localPosition = charObj[i].transform.localPosition + shift;
charObj[i].transform.localScale = new Vector3((i == combo.Length - 1) ? 1.3f : 1, (i == combo.Length - 1) ? 1.3f : 1, 1);
}
}
StartCoroutine(EmphasizeCoroutine(combo.Length - 1));
}
currentCombo = combo;
}
IEnumerator EmphasizeCoroutine(int n)
{
for (float timer = 0f; timer < 0.5f; timer += Time.deltaTime)
{
charObj[n].transform.localScale = new Vector3(-2.5f * Mathf.Pow(timer * 2 - 0.45f,2f) + 1.75625f, -2.5f * Mathf.Pow(timer * 2 - 0.45f, 2f) + 1.75625f, 1);
yield return null;
}
charObj[n].transform.localScale = new Vector3(1, 1, 1);
}
public void SetTime()
{
RectTransform rtt = timeUI.GetComponent<RectTransform>();
rtt.sizeDelta = new Vector2(0, rtt.sizeDelta.y);
}
public void SetTime(float currentTime, float fullTime)
{
RectTransform rtt = timeUI.GetComponent<RectTransform>();
rtt.sizeDelta = new Vector2(timeUILength * (currentTime / fullTime), rtt.sizeDelta.y);
}
}
fileFormatVersion: 2
guid: 0296171c22d97e64baf3fa3893e42f81
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -55,13 +55,15 @@ public class LifeStoneManager : Singleton<LifeStoneManager> {
public GameObject droppedLifeStonePrefab;
public GameObject lifeStoneUI;
public float frameBorder;
public float popoutStrengthMultiplier;
public float popoutTime;
void Start () {
transform.position = new Vector3(lifeStoneLocation.x, lifeStoneLocation.y, 0);
lifeStoneUI.transform.position = new Vector3(lifeStoneLocation.x, lifeStoneLocation.y, 0);
frameSuper.GetComponent<LifeStoneFrame>().Init(frameSuper.transform, standardImage, lifeStoneRowNum, lifeStoneSize, sprites, frameBorder);
lifeStoneArray = new int[50, 3];
lifeStoneUnit = new GameObject[50, 3];
......@@ -430,6 +432,20 @@ public class LifeStoneManager : Singleton<LifeStoneManager> {
}
}
StartCoroutine(DestroyInPhase(candArray));
StartCoroutine(HitRedEffect(num));
}
IEnumerator HitRedEffect(int damage)
{
float startTime = Time.time, endTime = startTime + 0.3f;
SpriteRenderer sprt = GameObject.Find("Player").GetComponent<SpriteRenderer>();
sprt.color = new Color(1, 0, 0);
while(Time.time < endTime)
{
sprt.color = new Color(1, 1 - (endTime - Time.time) / (endTime - startTime), 1 - (endTime - Time.time) / (endTime - startTime));
yield return null;
}
sprt.color = new Color(1, 1, 1);
}
/// <summary>
......@@ -574,10 +590,10 @@ public class LifeStoneManager : Singleton<LifeStoneManager> {
while(vibration > lifeStoneSize * 0.005f)
{
Vector2 tmpVector = Random.insideUnitCircle;
transform.position = new Vector3(lifeStoneLocation.x + tmpVector.x * vibration * 0.3f, lifeStoneLocation.y + tmpVector.y * vibration, 0);
lifeStoneUI.transform.position = new Vector3(lifeStoneLocation.x + tmpVector.x * vibration * 0.3f, lifeStoneLocation.y + tmpVector.y * vibration, 0);
vibration *= 0.8f;
yield return null;
}
transform.position = new Vector3(lifeStoneLocation.x, lifeStoneLocation.y, 0);
lifeStoneUI.transform.position = new Vector3(lifeStoneLocation.x, lifeStoneLocation.y, 0);
}
}
......@@ -51,6 +51,12 @@ TagManager:
- name: UI
uniqueID: 4254909397
locked: 0
- name: ItemHighlight
uniqueID: 996861525
locked: 0
- name: Item
uniqueID: 2145601713
locked: 0
- name: Wall
uniqueID: 3278214247
locked: 0
......@@ -69,12 +75,6 @@ TagManager:
- name: Spike
uniqueID: 3612720217
locked: 0
- name: ItemHighlight
uniqueID: 996861525
locked: 0
- name: Item
uniqueID: 2145601713
locked: 0
- name: Door
uniqueID: 343148499
locked: 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment