Commit 1e609043 authored by radow's avatar radow
Browse files

some minor fixes during the last check playthrough for the next build

parent 885143fb
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DeactrivateOnTrigger : MonoBehaviour
{
public GameObject activatable;
private void OnTriggerEnter(Collider other)
{
if (other.GetComponentInParent<PlayerController>())
{
activatable.SetActive(false);
}
}
}
fileFormatVersion: 2
guid: 36dc6e3f1b4dbd3409533c6acbc97c65
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
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: FrostedGlass 4
m_Shader: {fileID: 4800000, guid: 1b382d19d5c513e4ba4e644078d43741, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
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: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _FrossTex:
m_Texture: {fileID: 2800000, guid: 927c40066f8e9b443918415676a56ca8, type: 3}
m_Scale: {x: 2, y: 1}
m_Offset: {x: 0, y: 0}
- _FrostTex:
m_Texture: {fileID: 2800000, guid: 927c40066f8e9b443918415676a56ca8, type: 3}
m_Scale: {x: 2, y: 2}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
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_Ints: []
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _FrostIntensity: 1
- _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}
m_BuildTextureStacks: []
fileFormatVersion: 2
guid: b6f25d3052f134140aa234fed8ca4bd8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
......@@ -72,6 +72,7 @@ MonoBehaviour:
horRotSpeed: 500
jumpVelocity: 4
groundedCheckDistance: 0.2
deparenting: 0
--- !u!114 &355528851
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -87,7 +88,7 @@ MonoBehaviour:
maxDistance: 3
interactionMask:
serializedVersion: 2
m_Bits: 2147483647
m_Bits: 767
--- !u!1 &396634552801498755
GameObject:
m_ObjectHideFlags: 0
......
This diff is collapsed.
This diff is collapsed.
......@@ -6,23 +6,28 @@ using DG.Tweening;
public class Deactivateable : MonoBehaviour, IInteractable
{
public List<GameObject> deactivate = new List<GameObject>();
List<Vector3> scales = new List<Vector3>();
Vector3 originalScale;
private void Start()
{
originalScale = transform.localScale;
foreach (GameObject go in deactivate) scales.Add(go.transform.localScale);
}
public void Interact()
{
foreach (GameObject go in deactivate) go.transform.DOScale(Vector3.zero, .5f).OnComplete(()=> { go.SetActive(false); });
foreach (GameObject go in deactivate) go.transform.DOScale(Vector3.zero, .5f).OnComplete(()=> { go.SetActive(false); Debug.Log("deactivated"); });
}
public void Reset()
public bool Reset()
{
gameObject.SetActive(true);
transform.localScale = originalScale;
var res = !gameObject.activeSelf;
for(int i = 0; i<deactivate.Count; i++){
deactivate[i].SetActive(true);
deactivate[i].transform.localScale = scales[i];
}
return res;
}
public bool MayInteract()
......
......@@ -13,7 +13,10 @@ public class Deathvolume : MonoBehaviour
{
PlayerController.instance.transform.position = respawnpoint.position;
PlayerController.instance.transform.rotation = respawnpoint.rotation;
foreach (Deactivateable d in restList) d.Reset();
int i = 0;
foreach (Deactivateable d in restList) if(d.Reset()) i++;
Debug.Log($"Resetet {i} Platforms.");
}
}
}
......@@ -53,12 +53,16 @@ public class Fadescreen : MonoBehaviour
}
if (activeT)
{
endofgametext.gameObject.SetActive(true);
progressT += Time.deltaTime / durT;
//t = Color.white;
t.a = progress;
endofgametext.color = t;
if (progressT > 1) activeT = false;
if(endofgametext)
{
endofgametext.gameObject.SetActive(true);
progressT += Time.deltaTime / durT;
//t = Color.white;
t.a = progress;
endofgametext.color = t;
if (progressT > 1) activeT = false;
}
}
if (activeFrom)
{
......
......@@ -15,7 +15,7 @@ TagManager:
- lamps
- VA
- blocking volume
-
- Trigger
-
-
-
......
Supports Markdown
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