Muudatused

This commit is contained in:
Kasutaja 2023-04-30 00:50:24 +03:00
parent 147ce39f2b
commit cdbdbc28c4
4 changed files with 34 additions and 335 deletions

View File

@ -11,6 +11,12 @@ public class MüntideLugeja : MonoBehaviour
public void AnnaMünte(int arv)
{
this.arv += arv;
textMeshProUGUI.text = this.arv + " $";
textMeshProUGUI.text = this.arv + "";
}
public void Nulli()
{
this.arv = 0;
textMeshProUGUI.text = this.arv + "";
}
}

View File

@ -26,6 +26,4 @@ public class pahalane : MonoBehaviour
}
}
}

View File

@ -2,6 +2,7 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
using UnityEngine.SceneManagement;
public class player : MonoBehaviour
{
@ -84,7 +85,7 @@ public class player : MonoBehaviour
var targetFollower = GetComponent<TargetFollower>();
if (targetFollower.kaesolevAsi == null) return;
var müntideArv = targetFollower.kaesolevAsi.GetComponent<Kast>().müntideArv;
FindObjectOfType<MüntideLugeja>().AnnaMünte(müntideArv);
//FindObjectOfType<MüntideLugeja>().AnnaMünte(müntideArv);
Destroy(targetFollower.kaesolevAsi.gameObject);
for (var i = 0; i < müntideArv; i++)
@ -92,14 +93,18 @@ public class player : MonoBehaviour
var münt = Instantiate(mündiEffekt, transform.position, Quaternion.identity);
//münt.transform.localScale = Vector3.zero;
var seq = DOTween.Sequence();
seq.Append(münt.transform.DOScale(Vector3.one, i).SetEase(Ease.InOutQuad));
seq.Append(münt.transform.DOMove(mündiMinekuAsukoht.position, 0.3f + (i * 0.1f)).SetEase(Ease.InOutQuad));
var tf = münt.AddComponent<TargetFollower>();
tf.kiirus = 5f - i * (0.5f);
tf.kasi = mündiMinekuAsukoht;
tf.kaesolevAsi = münt.transform;
Destroy(münt, 5f - i * (0.5f));
//tf.kiirus = 2f + i * (1f);
//tf.kasi = mündiMinekuAsukoht;
//tf.kaesolevAsi = münt.transform;
//seq.Append(münt.transform.DOScale(Vector3.one, i).SetEase(Ease.InOutQuad));
//seq.Append(münt.transform.DOScale(Vector3.zero, i).SetEase(Ease.InOutQuad)).OnComplete(() => { Destroy(münt); });
seq.Append(münt.transform.DOShakeRotation(0.2f).SetEase(Ease.InOutQuad).OnStart(() => {
tf.kiirus = 10f;
tf.kasi = mündiMinekuAsukoht;
tf.kaesolevAsi = münt.transform;
}));
seq.OnComplete(() => { Destroy(münt); FindObjectOfType<MüntideLugeja>().AnnaMünte(1); });
}
}
@ -107,8 +112,8 @@ public class player : MonoBehaviour
public void Surm()
{
transform.position = new Vector3(-78, 1138, 0);
FindObjectOfType<MüntideLugeja>().Nulli();
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
}

View File

@ -237,258 +237,6 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 16063673}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &88359712
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 88359713}
- component: {fileID: 88359717}
- component: {fileID: 88359716}
- component: {fileID: 88359715}
- component: {fileID: 88359714}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &88359713
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 88359712}
m_LocalRotation: {x: -0, y: 0.7071068, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 5.37}
m_LocalScale: {x: -0.030073326, y: 0.027842809, z: 0.35636702}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 97129035}
m_Father: {fileID: 195890916}
m_RootOrder: 15
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: -6.9, y: 0.5845947}
m_SizeDelta: {x: 5, y: 5}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &88359714
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 88359712}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 82353085bada6d74ab12b2a98a8667b3, type: 3}
m_Name:
m_EditorClassIdentifier:
kasi: {fileID: 1805858244}
kaesolevAsi: {fileID: 696807845}
kiirus: 10
--- !u!114 &88359715
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 88359712}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &88359716
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 88359712}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 1
--- !u!223 &88359717
Canvas:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 88359712}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 25
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!1 &97129034
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 97129035}
- component: {fileID: 97129037}
- component: {fileID: 97129036}
m_Layer: 5
m_Name: Text (TMP)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &97129035
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 97129034}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 88359713}
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!114 &97129036
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 97129034}
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: 0
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, 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: 4.45
m_fontSizeBase: 36
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 0.1
m_fontSizeMax: 72
m_fontStyle: 1
m_HorizontalAlignment: 1
m_VerticalAlignment: 256
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!222 &97129037
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 97129034}
m_CullTransparentMesh: 1
--- !u!1 &121481725
GameObject:
m_ObjectHideFlags: 0
@ -856,7 +604,6 @@ Transform:
- {fileID: 289482961}
- {fileID: 1145842258}
- {fileID: 1193270436}
- {fileID: 88359713}
m_Father: {fileID: 1432396816}
m_RootOrder: 29
m_LocalEulerAnglesHint: {x: 0, y: 90, z: 0}
@ -923,63 +670,6 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 195890915}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1001 &224515647
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_LocalPosition.x
value: -47.32
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_LocalPosition.y
value: 1144.72
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_LocalPosition.z
value: 3644.7764
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
propertyPath: m_Name
value: Pohismurf_Rogerile
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: b9c6a7e51fde04c4d9891052f0dbf5f1, type: 3}
--- !u!1 &267918379
GameObject:
m_ObjectHideFlags: 0
@ -1334,7 +1024,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3385294709392825955, guid: 0c5eef9022e436e4b80daa5a49937e0b, type: 3}
propertyPath: m_RootOrder
value: 14
value: 13
objectReference: {fileID: 0}
- target: {fileID: 3385294709392825955, guid: 0c5eef9022e436e4b80daa5a49937e0b, type: 3}
propertyPath: m_LocalPosition.x
@ -2825,7 +2515,7 @@ Transform:
- {fileID: 338501581}
- {fileID: 1832689337}
m_Father: {fileID: 0}
m_RootOrder: 12
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &705507993
GameObject:
@ -2919,7 +2609,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1 &709079335
GameObject:
@ -3366,7 +3056,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 10
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &896569889
GameObject:
@ -4568,7 +4258,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 1224873760334372740, guid: 56e10d6bac5f7354a976dc8988be032f, type: 3}
propertyPath: m_RootOrder
value: 13
value: 12
objectReference: {fileID: 0}
- target: {fileID: 1224873760334372740, guid: 56e10d6bac5f7354a976dc8988be032f, type: 3}
propertyPath: m_LocalPosition.x
@ -4900,7 +4590,7 @@ Transform:
- {fileID: 195890916}
- {fileID: 1117755461}
m_Father: {fileID: 0}
m_RootOrder: 9
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1473084635
GameObject:
@ -5550,7 +5240,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 11
m_RootOrder: 10
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1805858243
GameObject:
@ -6203,7 +5893,7 @@ Transform:
m_Children:
- {fileID: 1286244797}
m_Father: {fileID: 0}
m_RootOrder: 4
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2031519063
GameObject:
@ -6425,7 +6115,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 1224873760334372740, guid: 56e10d6bac5f7354a976dc8988be032f, type: 3}
propertyPath: m_RootOrder
value: 7
value: 6
objectReference: {fileID: 0}
- target: {fileID: 1224873760334372740, guid: 56e10d6bac5f7354a976dc8988be032f, type: 3}
propertyPath: m_LocalPosition.x
@ -6540,7 +6230,7 @@ Transform:
- {fileID: 4391729032657897299}
- {fileID: 813097714}
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &3385294710496339853
PrefabInstance:
@ -6551,7 +6241,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 3385294709392825955, guid: 0c5eef9022e436e4b80daa5a49937e0b, type: 3}
propertyPath: m_RootOrder
value: 8
value: 7
objectReference: {fileID: 0}
- target: {fileID: 3385294709392825955, guid: 0c5eef9022e436e4b80daa5a49937e0b, type: 3}
propertyPath: m_LocalPosition.x
@ -6864,7 +6554,7 @@ Transform:
- {fileID: 1504081199233271118}
- {fileID: 896569890}
m_Father: {fileID: 0}
m_RootOrder: 2
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!33 &7161915723433907447
MeshFilter:
@ -6936,7 +6626,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7329513831249951194, guid: bb5348384d7cd4348acb6ddd606e9a06, type: 3}
propertyPath: m_RootOrder
value: 5
value: 4
objectReference: {fileID: 0}
- target: {fileID: 7329513831249951194, guid: bb5348384d7cd4348acb6ddd606e9a06, type: 3}
propertyPath: m_LocalPosition.x