Commit f9003744 authored by Sven's avatar Sven

Merge branch 'master' of...

Merge branch 'master' of gitlab.fsi.hochschule-trier.de:GameDevWeek/sommersemester-2019/unity/touch-me-if-you-can
parents 58d10300 5ebca023
This diff is collapsed.
fileFormatVersion: 2
guid: 3646c105d0120da42b224c42bbd2e079
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GroundMaterial
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _METALLICGLOSSMAP _NORMALMAP
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 2800000, guid: 758ebfbb39e1d844180222359ea1bc02, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 30, y: 30}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: 982109afe51f54043a0fe77484a95816, type: 3}
m_Scale: {x: 30, y: 30}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 2800000, guid: 889e5d18a09ba784b8e47ab33bcfae71, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
fileFormatVersion: 2
guid: 798f87198bcd0044abecc63384dd79a5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
This image diff could not be displayed because it is too large. You can view the blob instead.
fileFormatVersion: 2
guid: 982109afe51f54043a0fe77484a95816
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
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: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
This image diff could not be displayed because it is too large. You can view the blob instead.
fileFormatVersion: 2
guid: 758ebfbb39e1d844180222359ea1bc02
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 0
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: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 1
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
This image diff could not be displayed because it is too large. You can view the blob instead.
fileFormatVersion: 2
guid: 889e5d18a09ba784b8e47ab33bcfae71
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 10
mipmaps:
mipMapMode: 0
enableMipMap: 1
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: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
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: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
using System.Collections;
using System.Collections.Generic;
using _Game.Scripts.GameManager;
using _Game.Scripts.GameManagerData;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class CharacterCustomization : MonoBehaviour {
[SerializeField] private GameData data;
public class CharacterCustomization : MonoBehaviour
{
public GameManagerData data;
public TMP_InputField player1InputField;
public TMP_InputField player2InputField;
public Button greenButtonP1;
public Button yellowButtonP1;
public Button redButtonP1;
public Button blueButtonP1;
public Button greyButtonP1;
public Button greenButtonP2;
public Button yellowButtonP2;
public Button redButtonP2;
public Button blueButtonP2;
public Button greyButtonP2;
// Start is called before the first frame update
// Start is called before the first frame update
// called first
void OnEnable() {
void OnEnable()
{
SceneManager.sceneLoaded += OnSceneLoaded;
}
void OnDisable() {
void OnDisable()
{
Debug.Log("OnDisable");
SceneManager.sceneLoaded -= OnSceneLoaded;
}
//
// called second
void OnSceneLoaded(Scene scene, LoadSceneMode mode) {
player1InputField.text = data.player1.name;
player2InputField.text = data.player2.name;
void OnSceneLoaded(Scene scene, LoadSceneMode mode)
{
player1InputField.text = data.Player1Name;
player2InputField.text = data.Player2Name;
}
public void GoToGameScene()
{
data.Player1Name = player1InputField.text;
data.Player2Name = player2InputField.text;
SceneManager.LoadScene("TestLevel");
}
public void GoToGameScene() {
data.Reset();
data.player1.Reset(player1InputField.text, Color.green);
data.player2.Reset(player2InputField.text, Color.red);
SceneManager.LoadScene("MainLevel");
public void ChangeColorPlayer1(int colors)
{
switch (colors)
{
case 1:
data.Player1Color = Color.green;
break;
case 2 :
data.Player1Color = Color.yellow;
break;
case 3 :
data.Player1Color = Color.red;
break;
case 4 :
data.Player1Color = Color.blue;
break;
default:
data.Player1Color = Color.gray;
break;
}
}
public void ChangeColorPlayer2(int colors2)
{
switch (colors2)
{
case 1:
data.Player2Color = Color.green;
break;
case 2 :
data.Player2Color = Color.yellow;
break;
case 3 :
data.Player2Color = Color.red;
break;
case 4 :
data.Player2Color = Color.blue;
break;
default :
data.Player2Color = Color.gray;
break;
}
}
public void ButtonSelected1(int buttonNummber)
{
switch (buttonNummber)
{
case 0 :
greenButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.BoldAndItalic;
yellowButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
redButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
blueButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
greyButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
break;
case 1 :
yellowButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.BoldAndItalic;
greenButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
redButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
blueButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
greyButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
break;
case 2 :
redButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.BoldAndItalic;
greenButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
yellowButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
blueButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
greyButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
break;
case 3 :
blueButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.BoldAndItalic;
greenButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
yellowButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
redButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
greyButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
break;
default :
greyButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.BoldAndItalic;
greenButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
yellowButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
redButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
blueButtonP1.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
break;
}
}
public void ButtonSelected2(int buttonNummber2)
{
switch (buttonNummber2)
{
case 0 :
greenButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.BoldAndItalic;
yellowButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
redButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
blueButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
greyButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
break;
case 1 :
yellowButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.BoldAndItalic;
greenButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
redButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
blueButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
greyButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
break;
case 2 :
redButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.BoldAndItalic;
greenButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
yellowButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
blueButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
greyButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
break;
case 3 :
blueButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.BoldAndItalic;
greenButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
yellowButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
redButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
greyButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
break;
default :
greyButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.BoldAndItalic;
greenButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
yellowButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
redButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
blueButtonP2.GetComponentInChildren<Text>().fontStyle = FontStyle.Normal;
break;
}
}
}
}
......@@ -11,6 +11,7 @@
"com.unity.inputsystem": "0.9.6-preview",
"com.unity.multiplayer-hlapi": "1.0.2",
"com.unity.package-manager-ui": "2.2.0",
"com.unity.postprocessing": "2.1.7",
"com.unity.purchasing": "2.0.6",
"com.unity.test-framework": "1.0.13",
"com.unity.textmeshpro": "2.0.1",
......
......@@ -41,13 +41,29 @@ GraphicsSettings:
m_PreloadedShaders: []
m_SpritesDefaultMaterial: {fileID: 10754, guid: 0000000000000000f000000000000000,
type: 0}
m_CustomRenderPipeline: {fileID: 11400000, guid: d5a18db8a2c039c49b255cfede8f2cc5,
type: 2}
m_CustomRenderPipeline: {fileID: 0}
m_TransparencySortMode: 0
m_TransparencySortAxis: {x: 0, y: 0, z: 1}