Zakhar #4
55
.vscode/launch.json
vendored
Normal file
55
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,55 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
{
|
||||
"name": "Unity Editor",
|
||||
"type": "unity",
|
||||
"path": "/G:/Unity/Jump_And_Grub/Library/EditorInstance.json",
|
||||
"request": "launch"
|
||||
},
|
||||
{
|
||||
"name": "Windows Player",
|
||||
"type": "unity",
|
||||
"request": "launch"
|
||||
},
|
||||
{
|
||||
"name": "OSX Player",
|
||||
"type": "unity",
|
||||
"request": "launch"
|
||||
},
|
||||
{
|
||||
"name": "Linux Player",
|
||||
"type": "unity",
|
||||
"request": "launch"
|
||||
},
|
||||
{
|
||||
"name": "iOS Player",
|
||||
"type": "unity",
|
||||
"request": "launch"
|
||||
},
|
||||
{
|
||||
"name": "Android Player",
|
||||
"type": "unity",
|
||||
"request": "launch"
|
||||
},
|
||||
{
|
||||
"name": "Xbox One Player",
|
||||
"type": "unity",
|
||||
"request": "launch"
|
||||
},
|
||||
{
|
||||
"name": "PS4 Player",
|
||||
"type": "unity",
|
||||
"request": "launch"
|
||||
},
|
||||
{
|
||||
"name": "SwitchPlayer",
|
||||
"type": "unity",
|
||||
"request": "launch"
|
||||
}
|
||||
]
|
||||
}
|
42
.vscode/tasks.json
vendored
Normal file
42
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/Assembly-CSharp.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "publish",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/Assembly-CSharp.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"run",
|
||||
"${workspaceFolder}/Assembly-CSharp.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
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:
|
@ -83,7 +83,7 @@ MonoBehaviour:
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
m_PresetInfoIsWorld: 1
|
||||
--- !u!114 &6763014501615571600
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -186,7 +186,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 1.1486}
|
||||
m_AnchoredPosition: {x: 0, y: 1.1485596}
|
||||
m_SizeDelta: {x: 10, y: 5.4055}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!223 &8490769543284739872
|
||||
@ -232,7 +232,7 @@ MonoBehaviour:
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
m_PresetInfoIsWorld: 1
|
||||
m_PresetInfoIsWorld: 0
|
||||
--- !u!114 &1271697267505620599
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
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:
|
@ -123,6 +123,11 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 2346010271288414180}
|
||||
m_Modifications:
|
||||
- target: {fileID: 8170153791668043265, guid: 0d230cc8be529a542a08cb878ab14b18,
|
||||
type: 3}
|
||||
propertyPath: deadZone
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8170153791668043268, guid: 0d230cc8be529a542a08cb878ab14b18,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
@ -312,6 +317,11 @@ PrefabInstance:
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 2346010271288414180}
|
||||
m_Modifications:
|
||||
- target: {fileID: 8170153791668043265, guid: 0d230cc8be529a542a08cb878ab14b18,
|
||||
type: 3}
|
||||
propertyPath: deadZone
|
||||
value: 0.2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8170153791668043268, guid: 0d230cc8be529a542a08cb878ab14b18,
|
||||
type: 3}
|
||||
propertyPath: m_Pivot.x
|
||||
|
114
Assets/Prefab/Menu/Demo.prefab
Normal file
114
Assets/Prefab/Menu/Demo.prefab
Normal file
@ -0,0 +1,114 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &173658
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5048506557351598633}
|
||||
- component: {fileID: 1519512647055872152}
|
||||
m_Layer: 0
|
||||
m_Name: Demo
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &5048506557351598633
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 173658}
|
||||
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: 3231781222043810133}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1519512647055872152
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 173658}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a65dba056618ef244aa5f7a41138f642, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
upgradeInputModule: 1
|
||||
skyboxRoot: {fileID: 0}
|
||||
--- !u!1 &42099737742954725
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 3231781222043810133}
|
||||
- component: {fileID: 4539800119007132250}
|
||||
- component: {fileID: 2608960281581768207}
|
||||
m_Layer: 5
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &3231781222043810133
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 42099737742954725}
|
||||
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: 5048506557351598633}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &4539800119007132250
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 42099737742954725}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 76c392e42b5098c458856cdf6ecaaaa1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!114 &2608960281581768207
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 42099737742954725}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4f231c4fb786f3946a6b90b886c48677, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
7
Assets/Prefab/Menu/Demo.prefab.meta
Normal file
7
Assets/Prefab/Menu/Demo.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c3cd141781431534788e58c0dd3553cd
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Prefab/Tests.meta
Normal file
8
Assets/Prefab/Tests.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dfc9988be09620a4798e070262bdf0c6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
230
Assets/Prefab/Tests/Bullet.prefab
Normal file
230
Assets/Prefab/Tests/Bullet.prefab
Normal file
@ -0,0 +1,230 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1508996612506205613
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1508996612506205614}
|
||||
- component: {fileID: 1508996612506205615}
|
||||
m_Layer: 0
|
||||
m_Name: Circle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1508996612506205614
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1508996612506205613}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.5, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1508996612687079457}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &1508996612506205615
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1508996612506205613}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: -2413806693520163455, guid: ebe73ca9363db456bacf42c025bb4847,
|
||||
type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &1508996612687079456
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1508996612687079457}
|
||||
- component: {fileID: 1508996612687079458}
|
||||
m_Layer: 0
|
||||
m_Name: Square
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1508996612687079457
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1508996612687079456}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: -0.5, z: 0}
|
||||
m_LocalScale: {x: 0.23946421, y: 0.53201, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1508996612506205614}
|
||||
m_Father: {fileID: 1508996613087134754}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &1508996612687079458
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1508996612687079456}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 7482667652216324306, guid: 48e93eef0688c4a259cb0eddcd8661f7,
|
||||
type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &1508996613087134753
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1508996613087134754}
|
||||
- component: {fileID: 8444853135865988787}
|
||||
- component: {fileID: 3509611387413288450}
|
||||
m_Layer: 0
|
||||
m_Name: Bullet
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &1508996613087134754
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1508996613087134753}
|
||||
m_LocalRotation: {x: 0.5, y: -0.5, z: -0.5, w: 0.5}
|
||||
m_LocalPosition: {x: 0, y: 0.5, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children:
|
||||
- {fileID: 1508996612687079457}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: -90, z: -90}
|
||||
--- !u!54 &8444853135865988787
|
||||
Rigidbody:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1508996613087134753}
|
||||
serializedVersion: 2
|
||||
m_Mass: 1
|
||||
m_Drag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_UseGravity: 0
|
||||
m_IsKinematic: 0
|
||||
m_Interpolate: 0
|
||||
m_Constraints: 0
|
||||
m_CollisionDetection: 0
|
||||
--- !u!114 &3509611387413288450
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1508996613087134753}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 7fd043b309962ec4ab2244e7b7257fe7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
7
Assets/Prefab/Tests/Bullet.prefab.meta
Normal file
7
Assets/Prefab/Tests/Bullet.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 657111cb607c294479046ca0faef6c69
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
14
Assets/Prefab/Tests/DestroyBullet.cs
Normal file
14
Assets/Prefab/Tests/DestroyBullet.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class DestroyBullet : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
Destroy(gameObject, 2f);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
11
Assets/Prefab/Tests/DestroyBullet.cs.meta
Normal file
11
Assets/Prefab/Tests/DestroyBullet.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7fd043b309962ec4ab2244e7b7257fe7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
59
Assets/Prefab/Tests/Fire.cs
Normal file
59
Assets/Prefab/Tests/Fire.cs
Normal file
@ -0,0 +1,59 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Fire : MonoBehaviour
|
||||
{
|
||||
public Transform barrel;
|
||||
public GameObject bulletPref;
|
||||
|
||||
public GameObject[] ammo;
|
||||
public Stack<GameObject> ammoStack = new Stack<GameObject>();
|
||||
|
||||
private int ammoAnount;
|
||||
|
||||
private void Start() {
|
||||
//ammo.Push(bulletPref);
|
||||
for(int i = 0; i <=2; i++)
|
||||
{
|
||||
ammoStack.Push(ammo[i]);
|
||||
ammo[i].SetActive(false);
|
||||
Debug.Log($"Should print out : {ammoStack.Peek()}");
|
||||
|
||||
}
|
||||
// foreach (var item in ammoStack)
|
||||
// {
|
||||
// item.SetActive(false);
|
||||
// }
|
||||
|
||||
// if(ammo.Length <= 3)
|
||||
// {
|
||||
// ammoStack.Pop().SetActive(false);
|
||||
// Debug.Log($"Should print out : {ammoStack.Peek().name}");
|
||||
|
||||
// }
|
||||
ammoAnount = 0;
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
if(Input.GetButtonDown("Fire1") && ammoAnount > 0)
|
||||
{
|
||||
var spawnBullet = Instantiate(bulletPref, barrel.localPosition, barrel.rotation);
|
||||
//spawnBullet.GetComponent<Rigidbody>().
|
||||
spawnBullet.transform.Translate(Vector3.forward * Time.deltaTime * 10f);
|
||||
ammoAnount -= 1;
|
||||
ammoStack.Pop().SetActive(false);
|
||||
}
|
||||
|
||||
if(Input.GetKeyDown(KeyCode.R))
|
||||
{
|
||||
ammoAnount = 3;
|
||||
for (int i = 0; i <= 2; i++)
|
||||
{
|
||||
ammoStack.Push(ammo[i]);
|
||||
ammo[i].SetActive(true);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Prefab/Tests/Fire.cs.meta
Normal file
11
Assets/Prefab/Tests/Fire.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9f62e81b9dba43648bc3e2f3bcd1bc9e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
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:
|
@ -3931,6 +3931,11 @@ PrefabInstance:
|
||||
propertyPath: m_PresetInfoIsWorld
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9185818537322146330, guid: dec5dd0d644d5c548a53563e65837162,
|
||||
type: 3}
|
||||
propertyPath: m_FillAmount
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: dec5dd0d644d5c548a53563e65837162, type: 3}
|
||||
--- !u!1 &5591725933991455353 stripped
|
||||
|
@ -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
|
||||
|
@ -25,8 +25,8 @@ MonoBehaviour:
|
||||
maxHP: 100
|
||||
- isPlayer: 0
|
||||
spawnPos:
|
||||
x: 0
|
||||
z: 0
|
||||
x: 3
|
||||
z: 4
|
||||
unitPrefa: {fileID: 3762867976042010436, guid: d00f156879942114488e4db0689a3fb7,
|
||||
type: 3}
|
||||
color: 4
|
||||
|
@ -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}
|
||||
|
143648
Assets/Scenes/NewMainMenu.unity
Normal file
143648
Assets/Scenes/NewMainMenu.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/NewMainMenu.unity.meta
Normal file
7
Assets/Scenes/NewMainMenu.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9d1635b49ffb40046b1a26c6b196047e
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
1260
Assets/Scenes/TestMana.unity
Normal file
1260
Assets/Scenes/TestMana.unity
Normal file
File diff suppressed because it is too large
Load Diff
7
Assets/Scenes/TestMana.unity.meta
Normal file
7
Assets/Scenes/TestMana.unity.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 569e1bf438ac89d4f8cc374a6172c47a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
@ -24,6 +25,10 @@ namespace HexFiled
|
||||
_color = UnitColor.GREY;
|
||||
}
|
||||
|
||||
public List<HexCell> GetListNeighbours()
|
||||
{
|
||||
return neighbors.ToList();
|
||||
}
|
||||
public void SetDictionary(Dictionary<UnitColor, CellColor> colors)
|
||||
{
|
||||
_cellColor = colors;
|
||||
|
@ -11,5 +11,15 @@
|
||||
{
|
||||
return (int)direction < 3 ? (direction + 3) : (direction - 3);
|
||||
}
|
||||
|
||||
public static HexDirection PlusSixtyDeg(this HexDirection direction)
|
||||
{
|
||||
return (int) direction < 5? (direction + 1) : (HexDirection)0;
|
||||
}
|
||||
|
||||
public static HexDirection MinusSixtyDeg(this HexDirection direction)
|
||||
{
|
||||
return (int)direction > 0 ? (direction - 1) : (HexDirection)5;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,18 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using Data;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HexFiled
|
||||
{
|
||||
|
||||
public class PaintedController
|
||||
{
|
||||
public static Dictionary<UnitColor, HexCell> unitCurrentCell;
|
||||
|
||||
public static Dictionary<UnitColor, (HexCell previos, HexCell curent)> UnitCurrentCell;
|
||||
private HexCell _cell;
|
||||
|
||||
public PaintedController()
|
||||
{
|
||||
unitCurrentCell = new Dictionary<UnitColor, HexCell>();
|
||||
UnitCurrentCell = new Dictionary<UnitColor, (HexCell, HexCell)>();
|
||||
}
|
||||
|
||||
public void SetHexColors(HexCell cell)
|
||||
@ -20,7 +19,7 @@ namespace HexFiled
|
||||
_cell = cell;
|
||||
List<HexCell> cells = new List<HexCell>();
|
||||
|
||||
for(int i = 0 ; i < 6 ; i++)
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
cells.Add(cell.GetNeighbor((HexDirection)i));
|
||||
}
|
||||
@ -28,47 +27,82 @@ namespace HexFiled
|
||||
var hexByColorDict = DifferentHexByColor(cells);
|
||||
foreach (var item in hexByColorDict)
|
||||
{
|
||||
if(item.Value.Count > 0 && item.Key != UnitColor.GREY && item.Key != cell.Color )
|
||||
if (item.Value.Count > 0 && item.Key != UnitColor.GREY && item.Key != cell.Color)
|
||||
{
|
||||
foreach(var cellNeighbour in item.Value)
|
||||
foreach (var cellNeighbour in item.Value)
|
||||
{
|
||||
if(unitCurrentCell.ContainsKey(item.Key))
|
||||
if (UnitCurrentCell.ContainsKey(item.Key))
|
||||
{
|
||||
var path = HasPath(cellNeighbour, unitCurrentCell[item.Key]);
|
||||
if(!path.hasPath)
|
||||
var path = HasPath(cellNeighbour, UnitCurrentCell[item.Key].curent);
|
||||
if (!path.hasPath)
|
||||
{
|
||||
path.field.ForEach(x => x.PaintHex(UnitColor.GREY));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (item.Key == UnitColor.GREY)
|
||||
if (item.Key == cell.Color && item.Value.Count >= 2 && item.Value.Count < 6 &&
|
||||
UnitCurrentCell.ContainsKey(cell.Color))
|
||||
{
|
||||
HexDirection direction = new HexDirection();
|
||||
HexDirection openDirection = new HexDirection();
|
||||
HexDirection closeDirection = new HexDirection();
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
var neighbour = UnitCurrentCell[cell.Color].previos.GetNeighbor((HexDirection)i);
|
||||
|
||||
if (neighbour == UnitCurrentCell[cell.Color].curent)
|
||||
{
|
||||
direction = (HexDirection)i;
|
||||
}
|
||||
}
|
||||
|
||||
openDirection = direction.PlusSixtyDeg();
|
||||
closeDirection = direction.MinusSixtyDeg();
|
||||
|
||||
|
||||
var path = HasPath(
|
||||
UnitCurrentCell[cell.Color].previos.GetNeighbor(closeDirection),
|
||||
UnitCurrentCell[cell.Color].previos.GetNeighbor(openDirection)
|
||||
);
|
||||
|
||||
if (!path.hasPath)
|
||||
{
|
||||
path.field.ForEach(x => x.PaintHex(cell.Color));
|
||||
}
|
||||
else
|
||||
{
|
||||
path = HasPath(
|
||||
UnitCurrentCell[cell.Color].previos.GetNeighbor(openDirection),
|
||||
UnitCurrentCell[cell.Color].previos.GetNeighbor(closeDirection)
|
||||
);
|
||||
if (!path.hasPath)
|
||||
{
|
||||
path.field.ForEach(x => x.PaintHex(cell.Color));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private Dictionary<UnitColor, List<HexCell>> DifferentHexByColor(List<HexCell> cellsList)
|
||||
{
|
||||
Dictionary<UnitColor, List<HexCell>> resultDict = new Dictionary<UnitColor, List<HexCell>>();
|
||||
cellsList.ForEach(cell => {
|
||||
|
||||
if(cell != null && resultDict.ContainsKey(cell.Color))
|
||||
cellsList.ForEach(cell =>
|
||||
{
|
||||
if (cell != null && resultDict.ContainsKey(cell.Color))
|
||||
{
|
||||
resultDict[cell.Color].Add(cell);
|
||||
}
|
||||
else if(cell != null)
|
||||
else if (cell != null)
|
||||
{
|
||||
resultDict.Add(cell.Color, new List<HexCell>{cell});
|
||||
resultDict.Add(cell.Color, new List<HexCell> { cell });
|
||||
}
|
||||
|
||||
} );
|
||||
});
|
||||
return resultDict;
|
||||
}
|
||||
|
||||
private ( bool hasPath , List<HexCell> field ) HasPath(HexCell start, HexCell end)
|
||||
private ( bool hasPath, List<HexCell> field ) HasPath(HexCell start, HexCell end)
|
||||
{
|
||||
List<HexCell> closedList = new List<HexCell>();
|
||||
HexCell currentCell = start;
|
||||
@ -79,25 +113,54 @@ namespace HexFiled
|
||||
closedList.Add(currentCell);
|
||||
|
||||
|
||||
|
||||
while(stackIteators.Count >= 0 )
|
||||
while (stackIteators.Count >= 0)
|
||||
{
|
||||
if(currentCell == end)
|
||||
return ( true, closedList);
|
||||
if (currentCell == end)
|
||||
return (true, closedList);
|
||||
|
||||
List<HexCell> openList = new List<HexCell>();
|
||||
for(int i = 0 ; i < 6; i++)
|
||||
if(end.Color != UnitColor.GREY)
|
||||
{
|
||||
HexCell neighbour = currentCell.GetNeighbor( (HexDirection)i );
|
||||
if(!closedList.Contains(neighbour) && neighbour.Color == end.Color)
|
||||
if (end.Color != start.Color)
|
||||
{
|
||||
openList.Add(neighbour);
|
||||
return (true, null);
|
||||
}
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
HexCell neighbour = currentCell.GetNeighbor((HexDirection)i);
|
||||
if (neighbour == null)
|
||||
{
|
||||
return (true, null);
|
||||
}
|
||||
|
||||
if (!closedList.Contains(neighbour) && neighbour.Color == start.Color)
|
||||
{
|
||||
openList.Add(neighbour);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
HexCell neighbour = currentCell.GetNeighbor((HexDirection)i);
|
||||
if (neighbour == null)
|
||||
{
|
||||
return (true, null);
|
||||
}
|
||||
|
||||
if (!closedList.Contains(neighbour) &&
|
||||
neighbour.Color != _cell.Color)
|
||||
{
|
||||
openList.Add(neighbour);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(openList.Count > 0)
|
||||
if (openList.Count > 0)
|
||||
{
|
||||
currentCell = openList[Random.Range(0, openList.Count -1 )];
|
||||
currentCell = openList[Random.Range(0, openList.Count - 1)];
|
||||
closedList.Add(currentCell);
|
||||
stackIteators.Push(currentCell);
|
||||
}
|
||||
@ -105,75 +168,19 @@ namespace HexFiled
|
||||
{
|
||||
if (stackIteators.Count == 0)
|
||||
{
|
||||
return ( false, closedList);
|
||||
return (false, closedList);
|
||||
}
|
||||
|
||||
currentCell = stackIteators.Pop();
|
||||
}
|
||||
}
|
||||
return ( false, closedList);
|
||||
|
||||
if (currentCell.GetListNeighbours().Contains(end))
|
||||
{
|
||||
return (true, null);
|
||||
}
|
||||
}
|
||||
|
||||
return (false, closedList);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
if(start == end)
|
||||
return true;
|
||||
|
||||
if(currentCell.Cell.coordinates.Y < end.coordinates.Y)
|
||||
{
|
||||
var cellNeighbour = currentCell.Cell.GetNeighbor(HexDirection.W);
|
||||
if (!closedList.Contains(cellNeighbour) && cellNeighbour.Color == end.Color)
|
||||
{
|
||||
stackIteators.Push(currentCell);
|
||||
|
||||
currentCell = new HexIterator(cellNeighbour, true, currentCell.Cell);
|
||||
|
||||
closedList.Add(currentCell.Cell);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if(currentCell.Cell.coordinates.Y > end.coordinates.Y)
|
||||
{
|
||||
var cellNeighbour = currentCell.Cell.GetNeighbor(HexDirection.E);
|
||||
if(!closedList.Contains(cellNeighbour) && cellNeighbour.Color == end.Color)
|
||||
{
|
||||
stackIteators.Push(currentCell);
|
||||
currentCell = new HexIterator(cellNeighbour, true, currentCell.Cell);
|
||||
|
||||
closedList.Add(currentCell.Cell);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
// Z
|
||||
|
||||
if(currentCell.Cell.coordinates.Z > end.coordinates.Z)
|
||||
{
|
||||
var cellNeighbour = currentCell.Cell.GetNeighbor(HexDirection.SE);
|
||||
if (!closedList.Contains(cellNeighbour) && cellNeighbour.Color == end.Color)
|
||||
{
|
||||
stackIteators.Push(currentCell);
|
||||
|
||||
currentCell = new HexIterator(cellNeighbour, true, currentCell.Cell);
|
||||
|
||||
closedList.Add(currentCell.Cell);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
else if(currentCell.Cell.coordinates.Z < end.coordinates.Z)
|
||||
{
|
||||
var cellNeighbour = currentCell.Cell.GetNeighbor(HexDirection.NW);
|
||||
if(!closedList.Contains(cellNeighbour) && cellNeighbour.Color == end.Color)
|
||||
{
|
||||
stackIteators.Push(currentCell);
|
||||
currentCell = new HexIterator(cellNeighbour, true, currentCell.Cell);
|
||||
|
||||
closedList.Add(currentCell.Cell);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
currentCell = stackIteators.Pop();
|
||||
|
||||
if(stackIteators.Count == 0)
|
||||
return false;
|
||||
*/
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
|
8
Assets/Scripts/NewMenu.meta
Normal file
8
Assets/Scripts/NewMenu.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8143a9ada3328cd47be0140d3ea73d5d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/States.meta
Normal file
8
Assets/Scripts/States.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4690d5b96a9971f4fa845f4b25440eba
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
65
Assets/Scripts/States/Gamelogic.cs
Normal file
65
Assets/Scripts/States/Gamelogic.cs
Normal file
@ -0,0 +1,65 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Gamelogic : MonoBehaviour
|
||||
{
|
||||
Mana manaSystem;
|
||||
|
||||
private void Start() {
|
||||
manaSystem = new Mana();
|
||||
}
|
||||
|
||||
private void Update() {
|
||||
Debug.Log("HP: " + manaSystem.Current_MP);
|
||||
|
||||
manaSystem.Update();
|
||||
}
|
||||
}
|
||||
public class Mana
|
||||
{
|
||||
public float Max_MP = 100;
|
||||
public float Current_MP = 1;
|
||||
List<ManaRegen> regenList;
|
||||
public Mana()
|
||||
{
|
||||
regenList = new List<ManaRegen>();
|
||||
}
|
||||
public Mana(float max, float current)
|
||||
{
|
||||
Max_MP = max;
|
||||
Current_MP = current;
|
||||
regenList = new List<ManaRegen>();
|
||||
}
|
||||
public void Update() {
|
||||
foreach (var regen in regenList.ToArray())
|
||||
{
|
||||
if(Current_MP < Max_MP && regen.fDuraton > 0)
|
||||
{
|
||||
Current_MP += regen.fManaPerSecond * Time.deltaTime;
|
||||
}
|
||||
regen.fDuraton -= 1f *Time.deltaTime;
|
||||
|
||||
if(regen.fDuraton < 0)
|
||||
{
|
||||
regenList.RemoveAt(regenList.IndexOf(regen));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ManaRegen
|
||||
{
|
||||
public float fDuraton;
|
||||
public float fManaPerSecond;
|
||||
|
||||
public ManaRegen()
|
||||
{
|
||||
|
||||
}
|
||||
public ManaRegen(float duration, float manaPerSecond)
|
||||
{
|
||||
fDuraton = duration;
|
||||
fManaPerSecond = manaPerSecond;
|
||||
}
|
||||
}
|
11
Assets/Scripts/States/Gamelogic.cs.meta
Normal file
11
Assets/Scripts/States/Gamelogic.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d34080a61fa47645b032357092bcc99
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
60
Assets/Scripts/States/ManaBar.cs
Normal file
60
Assets/Scripts/States/ManaBar.cs
Normal file
@ -0,0 +1,60 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class ManaBar : MonoBehaviour
|
||||
{
|
||||
public Slider manaBar;
|
||||
|
||||
private int maxMana = 100;
|
||||
private int currentMana;
|
||||
private WaitForSeconds regenTick = new WaitForSeconds(0.5f);
|
||||
private Coroutine regen;
|
||||
|
||||
|
||||
public static ManaBar instance;
|
||||
|
||||
private void Awake() {
|
||||
instance = this;
|
||||
}
|
||||
|
||||
private void Start() {
|
||||
currentMana = maxMana;
|
||||
manaBar.maxValue = maxMana;
|
||||
manaBar.value = maxMana;
|
||||
}
|
||||
|
||||
public void UseMana(int amount)
|
||||
{
|
||||
if(currentMana - amount >= 0 )
|
||||
{
|
||||
currentMana -= amount;
|
||||
manaBar.value = currentMana;
|
||||
|
||||
if(regen != null)
|
||||
StopCoroutine(regen);
|
||||
|
||||
regen = StartCoroutine(RegenMana());
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Not enough mana");
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerator RegenMana()
|
||||
{
|
||||
yield return new WaitForSeconds(0.1f);
|
||||
|
||||
while(currentMana < maxMana)
|
||||
{
|
||||
currentMana += maxMana / 10;
|
||||
manaBar.value = currentMana;
|
||||
yield return regenTick;
|
||||
}
|
||||
|
||||
regen = null;
|
||||
}
|
||||
|
||||
}
|
11
Assets/Scripts/States/ManaBar.cs.meta
Normal file
11
Assets/Scripts/States/ManaBar.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 38891abd62cc9634584e630986c02534
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
13
Assets/Scripts/States/Player.cs
Normal file
13
Assets/Scripts/States/Player.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Player : MonoBehaviour
|
||||
{
|
||||
private void Update() {
|
||||
if(Input.GetKeyDown(KeyCode.Space))
|
||||
{
|
||||
ManaBar.instance.UseMana(15);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/States/Player.cs.meta
Normal file
11
Assets/Scripts/States/Player.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8effecfd846c8cf43ab76c0185e0f2a0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -77,7 +77,9 @@ namespace Units
|
||||
{
|
||||
_isBusy = true;
|
||||
_isCapturing = _data.color != _cell.GetNeighbor(direction).Color;
|
||||
var previousCell = _cell;
|
||||
_cell = _cell.GetNeighbor(direction);
|
||||
PaintedController.UnitCurrentCell[_data.color] = (previousCell, _cell);
|
||||
RotateUnit(new Vector2((_cell.transform.position - _instance.transform.position).normalized.x,
|
||||
(_cell.transform.position - _instance.transform.position).normalized.z));
|
||||
_animator.SetTrigger("Move");
|
||||
@ -88,7 +90,6 @@ namespace Units
|
||||
private void CaptureHex()
|
||||
{
|
||||
_cell.PaintHex(_data.color);
|
||||
PaintedController.unitCurrentCell[_data.color] =_cell;
|
||||
}
|
||||
|
||||
private void SetAnimLength()
|
||||
@ -118,11 +119,17 @@ namespace Units
|
||||
_cell.PaintHex(_data.color);
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
_cell.GetNeighbor((HexDirection)i)?.PaintHex(_data.color);
|
||||
var neigh = _cell.GetNeighbor((HexDirection)i);
|
||||
neigh?.PaintHex(_data.color);
|
||||
|
||||
for (int j = 0; j < 6; j++)
|
||||
{
|
||||
neigh?.GetNeighbor((HexDirection)j)?.PaintHex(_data.color);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
PaintedController.unitCurrentCell.Add(_data.color, _cell);
|
||||
PaintedController.UnitCurrentCell.Add(_data.color, (null, _cell));
|
||||
//
|
||||
|
||||
_instance = Object.Instantiate(_data.unitPrefa, _cell.transform.parent);
|
||||
@ -151,23 +158,23 @@ namespace Units
|
||||
{
|
||||
_isBusy = false;
|
||||
_animator.SetBool("isMoving", _isBusy);
|
||||
if(!_isCapturing)
|
||||
if (!_isCapturing)
|
||||
{
|
||||
_isHardToCapture = false;
|
||||
_isHardToCapture = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (_isHardToCapture)
|
||||
{
|
||||
_unitView.HardCaptureHex(_cell);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
CaptureHex();
|
||||
MusicController.Instance.PlayRandomClip(MusicController.Instance.MusicData.SfxMusic.Captures,
|
||||
_cell.gameObject);
|
||||
}
|
||||
|
||||
|
||||
_isHardToCapture = false;
|
||||
}
|
||||
|
||||
@ -194,7 +201,7 @@ namespace Units
|
||||
ball.transform.DOMove(
|
||||
new Vector3(_direction.normalized.x,
|
||||
0, _direction.normalized.y) * _weapon.disnatce * _hexGrid.HexDistance +
|
||||
_instance.transform.position + new Vector3(0, 2, 0),
|
||||
_instance.transform.position + new Vector3(0, 2, 0), // initiate
|
||||
_weapon.speed)
|
||||
.SetEase(Ease.Linear)
|
||||
.OnComplete(() => Object.Destroy(ball));
|
||||
@ -220,6 +227,8 @@ namespace Units
|
||||
float maxHp = _data.maxHP;
|
||||
float maxMana = _data.maxMana;
|
||||
_barCanvas.ManaBar.DOFillAmount(mana / maxMana, 0.5f).SetEase(Ease.InQuad);
|
||||
//_barCanvas.ManaBar.value =
|
||||
//_unitView.RegenMana(10);
|
||||
_barCanvas.HealthBar.DOFillAmount(hp / maxHp, 0.5f).SetEase(Ease.InQuad);
|
||||
}
|
||||
|
||||
@ -267,6 +276,7 @@ namespace Units
|
||||
{
|
||||
Death();
|
||||
}
|
||||
|
||||
_hp -= dmg;
|
||||
UpdateBarCanvas();
|
||||
}
|
||||
|
@ -28,6 +28,9 @@ public class UnitView : MonoBehaviour
|
||||
private Action _startRegen;
|
||||
private Coroutine _previosRegen;
|
||||
private Coroutine _previosReload;
|
||||
//
|
||||
private WaitForSeconds regenTick = new WaitForSeconds(0.5f);
|
||||
//
|
||||
private int _mana;
|
||||
private Action _capureHex;
|
||||
private Sequence _sequence;
|
||||
@ -50,9 +53,9 @@ public class UnitView : MonoBehaviour
|
||||
{
|
||||
captureBar.gameObject.SetActive(true);
|
||||
_sequence = DOTween.Sequence();
|
||||
_sequence.Append(captureBar.DOFillAmount(1f, 0f).OnComplete(() =>
|
||||
_sequence.Append(captureBar.DOFillAmount(1f, 0f).SetEase(Ease.Linear).OnComplete(() =>
|
||||
{
|
||||
_capureHex.Invoke();
|
||||
_capureHex?.Invoke();
|
||||
captureBar.DOFillAmount(0f, 0f).SetEase(Ease.Linear);
|
||||
captureBar.gameObject.SetActive(false);
|
||||
MusicController.Instance.PlayRandomClip(MusicController.Instance.MusicData.SfxMusic.Captures,
|
||||
@ -85,13 +88,17 @@ public class UnitView : MonoBehaviour
|
||||
|
||||
public void RegenMana(int mana)
|
||||
{
|
||||
|
||||
if (_previosRegen != null)
|
||||
{
|
||||
StopCoroutine(_previosRegen);
|
||||
}
|
||||
|
||||
_mana = mana;
|
||||
//_startRegen.Invoke();
|
||||
_previosRegen = StartCoroutine(Regen());
|
||||
|
||||
//return _mana;
|
||||
}
|
||||
|
||||
private void Step()
|
||||
@ -132,9 +139,24 @@ public class UnitView : MonoBehaviour
|
||||
yield return new WaitForSeconds(_weapon.reloadTime);
|
||||
if (_toReloadStack.Count == 0) yield break;
|
||||
var shot = _toReloadStack.Pop();
|
||||
shot.Switch();
|
||||
_shootUIStack.Push(shot);
|
||||
StartCoroutine(Reload());
|
||||
|
||||
// _shootUIStack.Push(shot);
|
||||
shot.Switch();
|
||||
_shootUIStack.Push(shot);
|
||||
|
||||
foreach (var item in _toReloadStack)
|
||||
{
|
||||
if(Time.deltaTime < _weapon.reloadTime)
|
||||
{
|
||||
StopCoroutine(_previosReload);
|
||||
_previosReload = null;
|
||||
}
|
||||
_previosReload = StartCoroutine(Reload());
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
private IEnumerator Regen()
|
||||
@ -144,9 +166,17 @@ public class UnitView : MonoBehaviour
|
||||
yield break;
|
||||
}
|
||||
|
||||
yield return new WaitForSeconds(1f);
|
||||
_mana += _manaRegen;
|
||||
_startRegen.Invoke();
|
||||
StartCoroutine(Regen());
|
||||
|
||||
yield return new WaitForSeconds(2f);
|
||||
while(_mana < 100)
|
||||
{
|
||||
_mana += _manaRegen;
|
||||
_startRegen.Invoke();
|
||||
}
|
||||
|
||||
//StartCoroutine(Regen());
|
||||
_previosRegen = null;
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -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;
|
||||
|
64
Assets/ToolBarController.cs
Normal file
64
Assets/ToolBarController.cs
Normal file
@ -0,0 +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;
|
||||
|
||||
[RequireComponent(typeof(ScrollRect))]
|
||||
public class ToolBarController : MonoBehaviour, IEndDragHandler
|
||||
{
|
||||
[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 Start()
|
||||
{
|
||||
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)
|
||||
{
|
||||
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]);
|
||||
}
|
||||
}
|
11
Assets/ToolBarController.cs.meta
Normal file
11
Assets/ToolBarController.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9113d3c215185d649be126ff151fd059
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -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
Это надо было удалить