Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
GameDevWeek
Wintersemester 2018-2019
Unity
Suck It
Commits
31cc5191
Commit
31cc5191
authored
Mar 28, 2019
by
Isa
Browse files
HUD Fähigkeiten Box + Text
parent
5f3e7439
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Assets/TextMesh Pro/Resources/Fonts & Materials/LiberationSans SDF.asset
View file @
31cc5191
...
...
@@ -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
Assets/
Prefabs
.meta
→
Assets/
_Game/Font
.meta
View file @
31cc5191
fileFormatVersion: 2
guid:
34cd95c7cb004104c806a6578ee942d3
guid:
b44debfd3316a0343859348beec8652b
folderAsset: yes
DefaultImporter:
externalObjects: {}
...
...
Assets/_Game/Font/BradBunR SDF.asset
0 → 100644
View file @
31cc5191
This diff is collapsed.
Click to expand it.
Assets/_Game/Font/BradBunR SDF.asset.meta
0 → 100644
View file @
31cc5191
fileFormatVersion: 2
guid: 14c656a7951b64b469033bb82afe030d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
Assets/_Game/Font/BradBunR.ttf
0 → 100644
LFS
View file @
31cc5191
File added
Assets/_Game/Font/BradBunR.ttf.meta
0 → 100644
View file @
31cc5191
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:
Assets/_Game/Graphics/Sprite/HUD/TextBg.png
0 → 100644
LFS
View file @
31cc5191
130 Bytes
Assets/_Game/Graphics/Sprite/HUD/TextBg.png.meta
0 → 100644
View file @
31cc5191
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:
Assets/_Game/Prefabs/HUD.prefab
View file @
31cc5191
This diff is collapsed.
Click to expand it.
Assets/_Game/Scenes/MainLevel_Isa.unity
View file @
31cc5191
This diff is collapsed.
Click to expand it.
Assets/_Game/Scripts/UI/ElementAnzeige.cs
View file @
31cc5191
...
...
@@ -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
();
}
}
Assets/_Game/Scripts/UI/FaehigkeitenBox.cs
View file @
31cc5191
...
...
@@ -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
);
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment