new main menu
This commit is contained in:
parent
cd2a468be9
commit
9a0d54ee76
18
Assets/EquipmentView.cs
Normal file
18
Assets/EquipmentView.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class EquipmentView : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
Assets/EquipmentView.cs.meta
Normal file
11
Assets/EquipmentView.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 025f440838f42a14e87db46c2360aaad
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
36
Assets/HighLightButton.cs
Normal file
36
Assets/HighLightButton.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class HighLightButton : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private GameObject highLighter;
|
||||
[SerializeField] private List<Button> _buttons;
|
||||
|
||||
[SerializeField] private float _duration;
|
||||
[SerializeField] private Ease _ease;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
List<Transform> buttonTransforms = new List<Transform>();
|
||||
foreach (var button in _buttons)
|
||||
{
|
||||
buttonTransforms.Add(button.transform);
|
||||
}
|
||||
|
||||
var i = 0;
|
||||
buttonTransforms.ForEach(x => { _buttons[i++].onClick.AddListener(() => Highlight(x)); });
|
||||
i = 0;
|
||||
}
|
||||
|
||||
private void Highlight(Transform buttonTransform)
|
||||
{
|
||||
highLighter.transform
|
||||
.DOMove(new Vector3(buttonTransform.position.x, highLighter.transform.position.y, 0), _duration)
|
||||
.SetEase(_ease);
|
||||
|
||||
}
|
||||
}
|
11
Assets/HighLightButton.cs.meta
Normal file
11
Assets/HighLightButton.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d617def8d366147408d8fa6b815a1135
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
780
Assets/Prefab/CardSlot.prefab
Normal file
780
Assets/Prefab/CardSlot.prefab
Normal file
@ -0,0 +1,780 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2723081674590967522
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2723081674590967521}
|
||||
- component: {fileID: 2723081674590967520}
|
||||
m_Layer: 5
|
||||
m_Name: Mask
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2723081674590967521
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081674590967522}
|
||||
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: 2723081676577181429}
|
||||
- {fileID: 2723081676579607866}
|
||||
- {fileID: 2723081674960799236}
|
||||
m_Father: {fileID: 2723081676327820560}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 34.705013}
|
||||
m_SizeDelta: {x: -80, y: -149.40997}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2723081674590967520
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081674590967522}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 3312d7739989d2b4e91e6319e9a96d76, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Padding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Softness: {x: 0, y: 0}
|
||||
--- !u!1 &2723081674711438145
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2723081674711438144}
|
||||
- component: {fileID: 2723081674711438142}
|
||||
- component: {fileID: 2723081674711438143}
|
||||
m_Layer: 5
|
||||
m_Name: Text_Name
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2723081674711438144
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081674711438145}
|
||||
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: 2723081676327820560}
|
||||
m_RootOrder: 3
|
||||
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: -144}
|
||||
m_SizeDelta: {x: 387.66748, y: 83.36304}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2723081674711438142
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081674711438145}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &2723081674711438143
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081674711438145}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Golem
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 4995422ffdb954b70a642f73eb1442ea, type: 2}
|
||||
m_sharedMaterial: {fileID: 2517202264660172603, guid: 4995422ffdb954b70a642f73eb1442ea,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 60
|
||||
m_fontSizeBase: 60
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 2
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 1
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &2723081674960799237
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2723081674960799236}
|
||||
- component: {fileID: 2723081674960799234}
|
||||
- component: {fileID: 2723081674960799235}
|
||||
m_Layer: 5
|
||||
m_Name: Glow
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2723081674960799236
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081674960799237}
|
||||
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: 2723081674590967521}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 0}
|
||||
m_AnchoredPosition: {x: 2.9411, y: 57.5}
|
||||
m_SizeDelta: {x: 79.3203, y: 115}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2723081674960799234
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081674960799237}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &2723081674960799235
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081674960799237}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.043137256, g: 0.45490196, b: 0.80784315, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 8e29b5fe7ce3149e8aae1ee7b88d87b3, type: 3}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &2723081675456265477
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2723081675456265476}
|
||||
- component: {fileID: 2723081675456265474}
|
||||
- component: {fileID: 2723081675456265475}
|
||||
m_Layer: 5
|
||||
m_Name: Icon
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2723081675456265476
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081675456265477}
|
||||
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: 2723081675833736174}
|
||||
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: 42, y: 42}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2723081675456265474
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081675456265477}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &2723081675456265475
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081675456265477}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 7a860c9c2d94544b688db0cd613e58bd, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &2723081675786669326
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2723081675786669325}
|
||||
- component: {fileID: 2723081675786669323}
|
||||
- component: {fileID: 2723081675786669324}
|
||||
m_Layer: 5
|
||||
m_Name: Text_Level
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2723081675786669325
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081675786669326}
|
||||
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: 2723081676327820560}
|
||||
m_RootOrder: 2
|
||||
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: -13, y: 186}
|
||||
m_SizeDelta: {x: 200, y: 50}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2723081675786669323
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081675786669326}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2723081675786669324
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081675786669326}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_text: Lv. 3
|
||||
m_isRightToLeft: 0
|
||||
m_fontAsset: {fileID: 11400000, guid: 4995422ffdb954b70a642f73eb1442ea, type: 2}
|
||||
m_sharedMaterial: {fileID: 2517202264660172603, guid: 4995422ffdb954b70a642f73eb1442ea,
|
||||
type: 2}
|
||||
m_fontSharedMaterials: []
|
||||
m_fontMaterial: {fileID: 0}
|
||||
m_fontMaterials: []
|
||||
m_fontColor32:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_enableVertexGradient: 0
|
||||
m_colorMode: 3
|
||||
m_fontColorGradient:
|
||||
topLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
topRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
|
||||
bottomRight: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_fontColorGradientPreset: {fileID: 0}
|
||||
m_spriteAsset: {fileID: 0}
|
||||
m_tintAllSprites: 0
|
||||
m_StyleSheet: {fileID: 0}
|
||||
m_TextStyleHashCode: -1183493901
|
||||
m_overrideHtmlColors: 0
|
||||
m_faceColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4294967295
|
||||
m_fontSize: 60
|
||||
m_fontSizeBase: 60
|
||||
m_fontWeight: 400
|
||||
m_enableAutoSizing: 0
|
||||
m_fontSizeMin: 18
|
||||
m_fontSizeMax: 72
|
||||
m_fontStyle: 0
|
||||
m_HorizontalAlignment: 1
|
||||
m_VerticalAlignment: 512
|
||||
m_textAlignment: 65535
|
||||
m_characterSpacing: 0
|
||||
m_wordSpacing: 0
|
||||
m_lineSpacing: 0
|
||||
m_lineSpacingMax: 0
|
||||
m_paragraphSpacing: 0
|
||||
m_charWidthMaxAdj: 0
|
||||
m_enableWordWrapping: 1
|
||||
m_wordWrappingRatios: 0.4
|
||||
m_overflowMode: 0
|
||||
m_linkedTextComponent: {fileID: 0}
|
||||
parentLinkedComponent: {fileID: 0}
|
||||
m_enableKerning: 1
|
||||
m_enableExtraPadding: 0
|
||||
checkPaddingRequired: 0
|
||||
m_isRichText: 1
|
||||
m_parseCtrlCharacters: 1
|
||||
m_isOrthographic: 1
|
||||
m_isCullingEnabled: 0
|
||||
m_horizontalMapping: 0
|
||||
m_verticalMapping: 0
|
||||
m_uvLineOffset: 0
|
||||
m_geometrySortingOrder: 0
|
||||
m_IsTextObjectScaleStatic: 0
|
||||
m_VertexBufferAutoSizeReduction: 0
|
||||
m_useMaxVisibleDescender: 1
|
||||
m_pageToDisplay: 1
|
||||
m_margin: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_isUsingLegacyAnimationComponent: 0
|
||||
m_isVolumetricText: 0
|
||||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &2723081675833736175
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2723081675833736174}
|
||||
- component: {fileID: 2723081675833736172}
|
||||
- component: {fileID: 2723081675833736173}
|
||||
m_Layer: 5
|
||||
m_Name: Type
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2723081675833736174
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081675833736175}
|
||||
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: 2723081675456265476}
|
||||
m_Father: {fileID: 2723081676327820560}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 1, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: -65, y: -57.199997}
|
||||
m_SizeDelta: {x: 77, y: 77}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2723081675833736172
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081675833736175}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &2723081675833736173
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081675833736175}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 535673d3292e04b449b63e2d699f99ef, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &2723081676327820561
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2723081676327820560}
|
||||
- component: {fileID: 2723081676327820558}
|
||||
- component: {fileID: 2723081676327820559}
|
||||
m_Layer: 5
|
||||
m_Name: CardSlot
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2723081676327820560
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081676327820561}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.7, y: 0.7, z: 0.0065099997}
|
||||
m_Children:
|
||||
- {fileID: 2723081674590967521}
|
||||
- {fileID: 2723081675833736174}
|
||||
- {fileID: 2723081675786669325}
|
||||
- {fileID: 2723081674711438144}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 287.80002, y: -213.055}
|
||||
m_SizeDelta: {x: 252.2, y: 426.11}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2723081676327820558
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081676327820561}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2723081676327820559
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081676327820561}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 91d37967864564f818aaf9326fcf0302, type: 3}
|
||||
m_Type: 1
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &2723081676577181430
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2723081676577181429}
|
||||
- component: {fileID: 2723081676577181427}
|
||||
- component: {fileID: 2723081676577181428}
|
||||
m_Layer: 5
|
||||
m_Name: BackGlow
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2723081676577181429
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081676577181430}
|
||||
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: 2723081674590967521}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2723081676577181427
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081676577181430}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!114 &2723081676577181428
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081676577181430}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 2100000, guid: 728fa64fe6dd24aa5ae13b1da2514961, type: 2}
|
||||
m_Color: {r: 0.4745098, g: 0.91764706, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 30af861f4c8c141159c3c1ff5b424c3c, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &2723081676579607867
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2723081676579607866}
|
||||
- component: {fileID: 2723081676579607864}
|
||||
- component: {fileID: 2723081676579607865}
|
||||
m_Layer: 5
|
||||
m_Name: Golem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &2723081676579607866
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081676579607867}
|
||||
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: 2723081674590967521}
|
||||
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.000015258789, y: -0.000015258789}
|
||||
m_SizeDelta: {x: 68, y: 72}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &2723081676579607864
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081676579607867}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &2723081676579607865
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2723081676579607867}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 413710b631bd5493ebbf1a29b2d82eb3, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
7
Assets/Prefab/CardSlot.prefab.meta
Normal file
7
Assets/Prefab/CardSlot.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15034609a8378124283961a4f6ac36c5
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
2553
Assets/Prefab/Weapon.prefab
Normal file
2553
Assets/Prefab/Weapon.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Prefab/Weapon.prefab.meta
Normal file
7
Assets/Prefab/Weapon.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05b7fd78d6e223444b3b41449c0dd92c
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Prefab/WeaponIcons.meta
Normal file
8
Assets/Prefab/WeaponIcons.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3671872178cfb3c4893c0451c776761f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
229
Assets/Prefab/WeaponIcons/LaserIcon.prefab
Normal file
229
Assets/Prefab/WeaponIcons/LaserIcon.prefab
Normal file
@ -0,0 +1,229 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &2246308528984667407
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 232060285528479143}
|
||||
- component: {fileID: 8679640307251198234}
|
||||
- component: {fileID: 722092151135641535}
|
||||
m_Layer: 5
|
||||
m_Name: Icon (3)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &232060285528479143
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2246308528984667407}
|
||||
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: 3777131139682951226}
|
||||
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: -101, y: 91}
|
||||
m_SizeDelta: {x: 205.9525, y: 96.919}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &8679640307251198234
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2246308528984667407}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &722092151135641535
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2246308528984667407}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: d4bb18948d3349d4d9fd57df4a41c617, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &3777131139117233513
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3777131139117233510}
|
||||
- component: {fileID: 3777131139117233508}
|
||||
- component: {fileID: 3777131139117233511}
|
||||
m_Layer: 5
|
||||
m_Name: Icon (2)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3777131139117233510
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3777131139117233513}
|
||||
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: 3777131139682951226}
|
||||
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: -101, y: -59}
|
||||
m_SizeDelta: {x: 205.9525, y: 96.919}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3777131139117233508
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3777131139117233513}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3777131139117233511
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3777131139117233513}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: d4bb18948d3349d4d9fd57df4a41c617, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!1 &3777131139682951229
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3777131139682951226}
|
||||
- component: {fileID: 3777131139682951224}
|
||||
- component: {fileID: 3777131139682951227}
|
||||
m_Layer: 5
|
||||
m_Name: LaserIcon
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3777131139682951226
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3777131139682951229}
|
||||
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: 3777131139117233510}
|
||||
- {fileID: 232060285528479143}
|
||||
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: -225.15, y: -17}
|
||||
m_SizeDelta: {x: 248.5043, y: 116.94}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3777131139682951224
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3777131139682951229}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3777131139682951227
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3777131139682951229}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: d4bb18948d3349d4d9fd57df4a41c617, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
7
Assets/Prefab/WeaponIcons/LaserIcon.prefab.meta
Normal file
7
Assets/Prefab/WeaponIcons/LaserIcon.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dcb79c5472cbd5f4eb050a4acc4b197e
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
77
Assets/Prefab/WeaponIcons/StandartIcon.prefab
Normal file
77
Assets/Prefab/WeaponIcons/StandartIcon.prefab
Normal file
@ -0,0 +1,77 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3777131139682951229
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3777131139682951226}
|
||||
- component: {fileID: 3777131139682951224}
|
||||
- component: {fileID: 3777131139682951227}
|
||||
m_Layer: 5
|
||||
m_Name: StandartIcon
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &3777131139682951226
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3777131139682951229}
|
||||
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: -225.15, y: -17}
|
||||
m_SizeDelta: {x: 255, y: 260}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &3777131139682951224
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3777131139682951229}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &3777131139682951227
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3777131139682951229}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_Sprite: {fileID: 21300000, guid: 2875114a1f6b2aa4bb4517c4c2f618b4, type: 3}
|
||||
m_Type: 0
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 4
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
7
Assets/Prefab/WeaponIcons/StandartIcon.prefab.meta
Normal file
7
Assets/Prefab/WeaponIcons/StandartIcon.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e85f2abe991b09140ac9b67cf8cb24a1
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -386,7 +386,7 @@ AnimatorController:
|
||||
m_Type: 9
|
||||
m_DefaultFloat: 0
|
||||
m_DefaultInt: 0
|
||||
m_DefaultBool: 0
|
||||
m_DefaultBool: 1
|
||||
m_Controller: {fileID: 0}
|
||||
- m_Name: Pressed
|
||||
m_Type: 9
|
||||
|
@ -12,5 +12,5 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: d81207667cf84460b3021cdd48c1471d, type: 3}
|
||||
m_Name: GameMenuData
|
||||
m_EditorClassIdentifier:
|
||||
isMusicAllowed: 0
|
||||
isSFXAllowed: 0
|
||||
musicVolume: 1
|
||||
sfxVolume: 1
|
||||
|
@ -13,7 +13,8 @@ MonoBehaviour:
|
||||
m_Name: WeaponsData
|
||||
m_EditorClassIdentifier:
|
||||
_weapons:
|
||||
- icon: {fileID: -9071853004870451029, guid: abec8c13117bc46418f08d21fd3ce03f, type: 3}
|
||||
- name: StandartAttac
|
||||
icon: {fileID: 3777131139682951229, guid: dcb79c5472cbd5f4eb050a4acc4b197e, type: 3}
|
||||
objectToThrow: {fileID: 4746165193704193263, guid: 4e7523811a052fd46acf941fc69c8c98,
|
||||
type: 3}
|
||||
VFXGameObject: {fileID: 2957420090356197408, guid: 5d1244f7b80cadd428a70173a01ce889,
|
||||
@ -26,7 +27,8 @@ MonoBehaviour:
|
||||
shots: 3
|
||||
shotSound: {fileID: 8300000, guid: 9ea918c6c23577f4e885a8490d2f2046, type: 3}
|
||||
hitSound: {fileID: 8300000, guid: 6c42231c18643dc4d9d8f8d15bc4735b, type: 3}
|
||||
- icon: {fileID: 3529690459429910812, guid: abec8c13117bc46418f08d21fd3ce03f, type: 3}
|
||||
- name: Laser
|
||||
icon: {fileID: 3777131139682951229, guid: e85f2abe991b09140ac9b67cf8cb24a1, type: 3}
|
||||
objectToThrow: {fileID: 7219588875883387333, guid: ab214974cd498df42867306700ba5fd2,
|
||||
type: 3}
|
||||
VFXGameObject: {fileID: 8715260329460421181, guid: e0388f43a34de79458c79763de903ffb,
|
||||
|
@ -5791,7 +5791,7 @@ MonoBehaviour:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 512299828}
|
||||
m_TargetAssemblyTypeName: SettingsController, Assembly-CSharp
|
||||
m_MethodName: OnMusicBtnClick
|
||||
m_MethodName: OnMusicSliderValueChanged
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
@ -9490,7 +9490,7 @@ MonoBehaviour:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 512299828}
|
||||
m_TargetAssemblyTypeName: SettingsController, Assembly-CSharp
|
||||
m_MethodName: OnSFXBtnClick
|
||||
m_MethodName: OnSFXSliderValueChanged
|
||||
m_Mode: 1
|
||||
m_Arguments:
|
||||
m_ObjectArgument: {fileID: 0}
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -6,13 +6,13 @@ namespace MainMenu
|
||||
[Serializable]
|
||||
public class AudioSettings
|
||||
{
|
||||
public bool isMusicAllowed;
|
||||
public bool isSFXAllowed;
|
||||
public float musicVolume;
|
||||
public float sfxVolume;
|
||||
|
||||
public AudioSettings(GameMenuData data)
|
||||
{
|
||||
isMusicAllowed = data.isMusicAllowed;
|
||||
isSFXAllowed = data.isMusicAllowed;
|
||||
musicVolume = data.musicVolume;
|
||||
sfxVolume = data.sfxVolume;
|
||||
}
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ namespace DefaultNamespace
|
||||
[CreateAssetMenu(fileName = "GameMenuData", menuName = "Data/GameMenuData", order = 0)]
|
||||
public class GameMenuData : ScriptableObject
|
||||
{
|
||||
public bool isMusicAllowed;
|
||||
public bool isSFXAllowed;
|
||||
public float musicVolume;
|
||||
public float sfxVolume;
|
||||
}
|
||||
}
|
@ -7,21 +7,25 @@ using AudioSettings = MainMenu.AudioSettings;
|
||||
|
||||
public class SettingsController : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Sprite musOnSpr, musOffSpr, sfxOnSpr, sfxOffSpr;
|
||||
[SerializeField] private Image musImg, sfxImg;
|
||||
[SerializeField] private AudioSource menuMusSrc;
|
||||
[SerializeField] private GameMenuData GameData;
|
||||
[SerializeField] private Transform targetSlideTransform;
|
||||
[SerializeField] private float slideTime;
|
||||
[SerializeField] private string dataFilePath;
|
||||
private bool _isActive = false;
|
||||
[SerializeField] private Slider musicSlider;
|
||||
[SerializeField] private Slider sfxSlider;
|
||||
[SerializeField] private Image musicImage;
|
||||
[SerializeField] private Sprite musicOnSprite;
|
||||
[SerializeField] private Sprite musicOffSprite;
|
||||
|
||||
[SerializeField] private Image sfxImage;
|
||||
[SerializeField] private Sprite sfxOnSprite;
|
||||
[SerializeField] private Sprite sfxOffSprite;
|
||||
|
||||
private AudioSettings _audioSettings;
|
||||
private Vector3 defailtPosition;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
dataFilePath = Application.persistentDataPath + "/" + dataFilePath;
|
||||
if(File.Exists(dataFilePath))
|
||||
if (File.Exists(dataFilePath))
|
||||
_audioSettings = JsonUtility.FromJson<AudioSettings>(File.ReadAllText(dataFilePath));
|
||||
else
|
||||
{
|
||||
@ -30,53 +34,42 @@ public class SettingsController : MonoBehaviour
|
||||
using StreamWriter writer = new StreamWriter(stream);
|
||||
writer.Write(JsonUtility.ToJson(_audioSettings));
|
||||
}
|
||||
|
||||
musicSlider.value = _audioSettings.musicVolume;
|
||||
sfxSlider.value = _audioSettings.sfxVolume;
|
||||
|
||||
defailtPosition = transform.position;
|
||||
SetMenuMusicState();
|
||||
musicSlider.onValueChanged.AddListener(x => OnMusicSliderValueChanged());
|
||||
sfxSlider.onValueChanged.AddListener(x => OnSFXSliderValueChanged());
|
||||
|
||||
UpdateVisuals();
|
||||
SetMenuMusicState();
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
private void UpdateVisuals()
|
||||
{
|
||||
musImg.sprite = _audioSettings.isMusicAllowed ? musOnSpr : musOffSpr;
|
||||
sfxImg.sprite = _audioSettings.isSFXAllowed ? sfxOnSpr : sfxOffSpr;
|
||||
musicImage.sprite = _audioSettings.musicVolume == 0f ? musicOffSprite : musicOnSprite;
|
||||
|
||||
sfxImage.sprite = _audioSettings.sfxVolume == 0f ? sfxOffSprite : sfxOnSprite;
|
||||
}
|
||||
|
||||
public void OnSettingsBtnClick()
|
||||
public void OnMusicSliderValueChanged()
|
||||
{
|
||||
_isActive = !_isActive;
|
||||
SlideSettings();
|
||||
}
|
||||
|
||||
private void SlideSettings()
|
||||
{
|
||||
transform.DOMove(_isActive ? targetSlideTransform.position : defailtPosition, slideTime);
|
||||
}
|
||||
|
||||
public void OnMusicBtnClick()
|
||||
{
|
||||
_audioSettings.isMusicAllowed = !_audioSettings.isMusicAllowed;
|
||||
musImg.sprite = _audioSettings.isMusicAllowed ? musOnSpr : musOffSpr;
|
||||
_audioSettings.musicVolume = musicSlider.value;
|
||||
SetMenuMusicState();
|
||||
File.WriteAllText(dataFilePath, JsonUtility.ToJson(_audioSettings));
|
||||
UpdateVisuals();
|
||||
}
|
||||
|
||||
public void OnSFXBtnClick()
|
||||
public void OnSFXSliderValueChanged()
|
||||
{
|
||||
_audioSettings.isSFXAllowed = !_audioSettings.isSFXAllowed;
|
||||
sfxImg.sprite = _audioSettings.isSFXAllowed ? sfxOnSpr : sfxOffSpr;
|
||||
_audioSettings.sfxVolume = sfxSlider.value;
|
||||
File.WriteAllText(dataFilePath, JsonUtility.ToJson(_audioSettings));
|
||||
UpdateVisuals();
|
||||
}
|
||||
|
||||
private void SetMenuMusicState()
|
||||
{
|
||||
if (_audioSettings.isMusicAllowed)
|
||||
{
|
||||
menuMusSrc.Play();
|
||||
}
|
||||
else
|
||||
{
|
||||
menuMusSrc.Pause();
|
||||
}
|
||||
menuMusSrc.volume = musicSlider.value;
|
||||
}
|
||||
}
|
@ -25,14 +25,14 @@ public class MusicController
|
||||
public void PlayAudioClip(AudioClip clip, GameObject source)
|
||||
{
|
||||
_sources[source].clip = clip;
|
||||
_sources[source].volume = _data.Settings.isSFXAllowed ? 1f : 0f;
|
||||
_sources[source].volume = _data.Settings.sfxVolume;
|
||||
_sources[source].Play();
|
||||
}
|
||||
|
||||
public void PlayRandomClip(List<AudioClip> clips, GameObject source)
|
||||
{
|
||||
_sources[source].clip = clips[Random.Range(0, clips.Count - 1)];
|
||||
_sources[source].volume = _data.Settings.isSFXAllowed ? 1f : 0f;
|
||||
_sources[source].volume = _data.Settings.sfxVolume;
|
||||
_sources[source].Play();
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,8 @@ namespace Weapons
|
||||
[Serializable]
|
||||
public struct Weapon
|
||||
{
|
||||
public Sprite icon;
|
||||
public string name;
|
||||
public GameObject icon;
|
||||
public GameObject objectToThrow;
|
||||
public GameObject VFXGameObject;
|
||||
public int manaCost;
|
||||
|
@ -1,38 +1,64 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using DG.Tweening;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ToolBarController : MonoBehaviour
|
||||
[RequireComponent(typeof(ScrollRect))]
|
||||
public class ToolBarController : MonoBehaviour, IEndDragHandler
|
||||
{
|
||||
[SerializeField] private GameObject playMenu;
|
||||
[SerializeField] private GameObject cardsMenu;
|
||||
[SerializeField] private GameObject shopMenu;
|
||||
[SerializeField] private GameObject equipmentMenu;
|
||||
[SerializeField] private GameObject mainMenu;
|
||||
|
||||
[SerializeField] private Button playMenuButton;
|
||||
[SerializeField] private Button cardsMenuButton;
|
||||
[SerializeField] private Button shopMenuButton;
|
||||
[SerializeField] private Button equipmentMenuButton;
|
||||
[SerializeField] private Button modeMenuButton;
|
||||
[SerializeField] private List<GameObject> content;
|
||||
|
||||
[SerializeField] private List<Button> buttons;
|
||||
[SerializeField] private int startPage;
|
||||
[SerializeField] private float duration;
|
||||
[SerializeField] private Ease ease;
|
||||
|
||||
private ScrollRect scrollRect;
|
||||
private int currentMenu;
|
||||
|
||||
private void Awake()
|
||||
private void Start()
|
||||
{
|
||||
playMenuButton.onClick.AddListener(() => ScrollToMenu(playMenu));
|
||||
cardsMenuButton.onClick.AddListener(() => ScrollToMenu(cardsMenu));
|
||||
shopMenuButton.onClick.AddListener(() => ScrollToMenu(shopMenu));
|
||||
equipmentMenuButton.onClick.AddListener(() => ScrollToMenu(equipmentMenu));
|
||||
scrollRect = GetComponent<ScrollRect>();
|
||||
var i = 0;
|
||||
content.ForEach(con =>
|
||||
{
|
||||
buttons[i++].onClick.AddListener(delegate { ScrollToMenu(con); });
|
||||
});
|
||||
|
||||
|
||||
buttons[startPage].Select();
|
||||
buttons[startPage].onClick.Invoke();
|
||||
scrollRect.onValueChanged.AddListener(FixedScroll);
|
||||
}
|
||||
|
||||
private void ScrollToMenu(GameObject menu)
|
||||
{
|
||||
mainMenu.transform.DOMove(-menu.transform.localPosition, duration).SetEase(ease);
|
||||
|
||||
Canvas.ForceUpdateCanvases();
|
||||
|
||||
Vector2 viewportLocalPosition = scrollRect.viewport.localPosition;
|
||||
Vector2 childLocalPosition = menu.transform.localPosition;
|
||||
Vector2 result = new Vector2(
|
||||
0 - (viewportLocalPosition.x + childLocalPosition.x),
|
||||
0 - (viewportLocalPosition.y + childLocalPosition.y)
|
||||
);
|
||||
|
||||
scrollRect.content.DOLocalMove(result, duration).SetEase(ease);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void FixedScroll(Vector2 vector2)
|
||||
{
|
||||
var step = 1f / (buttons.Count - 1);
|
||||
currentMenu = (int)Math.Round(vector2.x / step);
|
||||
}
|
||||
|
||||
public void OnEndDrag(PointerEventData eventData)
|
||||
{
|
||||
buttons[currentMenu].Select();
|
||||
ScrollToMenu(content[currentMenu]);
|
||||
}
|
||||
}
|
@ -8,11 +8,17 @@ public class WeaponIcon : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private Button button;
|
||||
[SerializeField] private TMP_Text damageText;
|
||||
[SerializeField] private TMP_Text shotsCount;
|
||||
[SerializeField] private TMP_Text reloadText;
|
||||
[SerializeField] private TMP_Text weaponTitle;
|
||||
[SerializeField] private GameObject icon;
|
||||
|
||||
public TMP_Text DamageText => damageText;
|
||||
|
||||
public TMP_Text ReloadText => reloadText;
|
||||
|
||||
public Button Button => button;
|
||||
public TMP_Text ShotsCount => shotsCount;
|
||||
public TMP_Text WeaponTitle => weaponTitle;
|
||||
public GameObject Icon => icon;
|
||||
}
|
||||
|
@ -26,13 +26,15 @@ public class WeaponSelection : MonoBehaviour
|
||||
data.WeaponsList.ForEach(x =>
|
||||
{
|
||||
var go = Instantiate(weaponIcon, grid);
|
||||
go.Button.image.sprite = x.icon;
|
||||
var icon = Instantiate(x.icon, go.Icon.transform);
|
||||
icon.transform.localPosition = Vector3.zero;
|
||||
go.DamageText.text = x.damage.ToString();
|
||||
go.ReloadText.text = x.reloadTime.ToString();
|
||||
go.ShotsCount.text = x.shots.ToString();
|
||||
go.WeaponTitle.text = x.name;
|
||||
go.Button.onClick.AddListener(() =>
|
||||
{
|
||||
ChoseWeapon(x);
|
||||
go.Button.image.color = Color.cyan;
|
||||
});
|
||||
_buttons.Add(go.Button);
|
||||
});
|
||||
|
@ -6,12 +6,15 @@ EditorBuildSettings:
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/MainMenu.unity
|
||||
guid: b2a550cf451c138468d4a907dfdd270e
|
||||
path: Assets/Scenes/NewMainMenu.unity
|
||||
guid: 9d1635b49ffb40046b1a26c6b196047e
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Level 1.unity
|
||||
guid: 9fc0d4010bbf28b4594072e72b8655ab
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Level 2.unity
|
||||
guid: 1923084fad99ff6459f09921ae54c76a
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/MainMenu.unity
|
||||
guid: b2a550cf451c138468d4a907dfdd270e
|
||||
m_configObjects: {}
|
||||
|
Loading…
x
Reference in New Issue
Block a user