Commit 31cc5191 authored by Isa's avatar Isa

HUD Fähigkeiten Box + Text

parent 5f3e7439
......@@ -9,7 +9,7 @@ Material:
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Material
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords: _EMISSION
m_ShaderKeywords: UNDERLAY_ON _EMISSION
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
......@@ -102,7 +102,7 @@ Material:
- _OutlineSoftness: 0
- _OutlineUVSpeedX: 0
- _OutlineUVSpeedY: 0
- _OutlineWidth: 0
- _OutlineWidth: 0.113
- _Parallax: 0.02
- _PerspectiveFilter: 0.875
- _Reflectivity: 10
fileFormatVersion: 2
guid: 34cd95c7cb004104c806a6578ee942d3
guid: b44debfd3316a0343859348beec8652b
folderAsset: yes
DefaultImporter:
externalObjects: {}
......
This diff is collapsed.
fileFormatVersion: 2
guid: 14c656a7951b64b469033bb82afe030d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 7b49a238c2ae40648abf67030ad58927
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontName: Brady Bunch Remastered
fontNames:
- Brady Bunch Remastered
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 35f90f7ca8ffd914585831ef16294a4c
TextureImporter:
fileIDToRecycleName: {}
externalObjects: {}
serializedVersion: 9
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: -1
aniso: -1
mipBias: -100
wrapU: 1
wrapV: 1
wrapW: -1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 2
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
- serializedVersion: 2
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
vertices: []
indices:
edges: []
weights: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
This diff is collapsed.
......@@ -2,9 +2,11 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using _Game.Scripts.Scriptable_Object;
public class ElementAnzeige : MonoBehaviour
{
[SerializeField] private PlayerState state;
public Sprite empty;
public GameObject Feuer;
public Sprite[] FeuerSprites;
......@@ -16,18 +18,6 @@ public class ElementAnzeige : MonoBehaviour
public Sprite[] LuftSprites;
public int availableCount = 0;
private int AnzElement;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void UpdateFeuerAnzeige()
{
Debug.Log("Feuer");
......@@ -107,4 +97,9 @@ public class ElementAnzeige : MonoBehaviour
break;
}
}
public void GetRemainingCharges()
{
availableCount = state.GetCharges();
}
}
......@@ -2,11 +2,14 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using _Game.Scripts.Scriptable_Object;
public class FaehigkeitenBox : MonoBehaviour
{
[SerializeField] private PlayerState state;
private Image BoxImg;
public Sprite[] Boxen;
public GameObject[] TextBox;
// Start is called before the first frame update
void Start()
{
......@@ -38,4 +41,43 @@ public class FaehigkeitenBox : MonoBehaviour
{
BoxImg.sprite = Boxen[4];
}
public void ResetBox()
{
BoxImg.sprite = Boxen[0];
}
public void CheckCharges()
{
if (state.GetCharges() == 0)
{
ResetBox();
}
}
public void ShowTextBox()
{
TextBox[0].SetActive(true);
if (BoxImg.sprite == Boxen[1])
{
TextBox[0].SetActive(true);
} else if (BoxImg.sprite == Boxen[2])
{
TextBox[1].SetActive(true);
} else if (BoxImg.sprite == Boxen[3])
{
TextBox[2].SetActive(true);
} else if (BoxImg.sprite == Boxen[4])
{
TextBox[3].SetActive(true);
}
}
public void HideTextBox()
{
TextBox[0].SetActive(false);
TextBox[1].SetActive(false);
TextBox[2].SetActive(false);
TextBox[3].SetActive(false);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment