Commit 795b16cc authored by Isa's avatar Isa
parents 08d5dae7 c7a51212
...@@ -38,7 +38,7 @@ MonoBehaviour: ...@@ -38,7 +38,7 @@ MonoBehaviour:
moveSpeed: 30 moveSpeed: 30
maxJumpCount: 0 maxJumpCount: 0
mass: 1 mass: 1
gravity: 3 gravity: 5
waterMoveState: waterMoveState:
jumpForce: 15 jumpForce: 15
smoothing: 0.03 smoothing: 0.03
......
fileFormatVersion: 2
guid: c8cb9794b39691c4b97290d4816afd9b
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: 128
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:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!74 &7400000
AnimationClip:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Character_Jump_2
serializedVersion: 6
m_Legacy: 0
m_Compressed: 0
m_UseHighQualityCurve: 1
m_RotationCurves: []
m_CompressedRotationCurves: []
m_EulerCurves: []
m_PositionCurves: []
m_ScaleCurves: []
m_FloatCurves: []
m_PPtrCurves: []
m_SampleRate: 60
m_WrapMode: 0
m_Bounds:
m_Center: {x: 0, y: 0, z: 0}
m_Extent: {x: 0, y: 0, z: 0}
m_ClipBindingConstant:
genericBindings: []
pptrCurveMapping: []
m_AnimationClipSettings:
serializedVersion: 2
m_AdditiveReferencePoseClip: {fileID: 0}
m_AdditiveReferencePoseTime: 0
m_StartTime: 0
m_StopTime: 1
m_OrientationOffsetY: 0
m_Level: 0
m_CycleOffset: 0
m_HasAdditiveReferencePose: 0
m_LoopTime: 0
m_LoopBlend: 0
m_LoopBlendOrientation: 0
m_LoopBlendPositionY: 0
m_LoopBlendPositionXZ: 0
m_KeepOriginalOrientation: 0
m_KeepOriginalPositionY: 1
m_KeepOriginalPositionXZ: 0
m_HeightFromFeet: 0
m_Mirror: 0
m_EditorCurves: []
m_EulerEditorCurves: []
m_HasGenericRootTransform: 0
m_HasMotionFloatCurves: 0
m_Events: []
fileFormatVersion: 2
guid: 221d267e96aa14665b205e5fe655e35f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 7400000
userData:
assetBundleName:
assetBundleVariant:
...@@ -670,7 +670,7 @@ MonoBehaviour: ...@@ -670,7 +670,7 @@ MonoBehaviour:
F um das Element zu benutzen F um das Element zu benutzen
E zum Speichern bei einem Checkpoint E zum Interagieren bei einem Checkpoint, Elemente, usw.
T zum Teleportieren bei einem Checkpoint T zum Teleportieren bei einem Checkpoint
...@@ -720,7 +720,7 @@ MonoBehaviour: ...@@ -720,7 +720,7 @@ MonoBehaviour:
m_enableWordWrapping: 1 m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4 m_wordWrappingRatios: 0.4
m_overflowMode: 0 m_overflowMode: 0
m_firstOverflowCharacterIndex: 93 m_firstOverflowCharacterIndex: 107
m_linkedTextComponent: {fileID: 0} m_linkedTextComponent: {fileID: 0}
m_isLinkedTextComponent: 0 m_isLinkedTextComponent: 0
m_isTextTruncated: 0 m_isTextTruncated: 0
...@@ -743,12 +743,12 @@ MonoBehaviour: ...@@ -743,12 +743,12 @@ MonoBehaviour:
m_margin: {x: 0, y: 0, z: 0, w: 0} m_margin: {x: 0, y: 0, z: 0, w: 0}
m_textInfo: m_textInfo:
textComponent: {fileID: 4648838426561617750} textComponent: {fileID: 4648838426561617750}
characterCount: 152 characterCount: 171
spriteCount: 0 spriteCount: 0
spaceCount: 26 spaceCount: 28
wordCount: 27 wordCount: 29
linkCount: 0 linkCount: 0
lineCount: 5 lineCount: 6
pageCount: 1 pageCount: 1
materialCount: 1 materialCount: 1
m_havePropertiesChanged: 0 m_havePropertiesChanged: 0
......
This source diff could not be displayed because it is too large. You can view the blob instead.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace EndMissionScript
{
public class EndMission : MonoBehaviour
{
public static EndMission em;
public bool mission;
private void Start()
{
em = this;
mission = false;
}
private void OnDestroy()
{
mission = true;
}
}
}
fileFormatVersion: 2
guid: 59d5594d570702d4d818016a9f0350e9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
...@@ -74,6 +74,7 @@ public class PlayerAnimation : MonoBehaviour ...@@ -74,6 +74,7 @@ public class PlayerAnimation : MonoBehaviour
switch (r_State.GetCurrentElement()) switch (r_State.GetCurrentElement())
{ {
case InfusedElement.None: case InfusedElement.None:
print("RESET");
if(m_ScalingActive)ScaleReset(); if(m_ScalingActive)ScaleReset();
if (m_RotationActive) if (m_RotationActive)
...@@ -84,8 +85,12 @@ public class PlayerAnimation : MonoBehaviour ...@@ -84,8 +85,12 @@ public class PlayerAnimation : MonoBehaviour
break; break;
case InfusedElement.Air: case InfusedElement.Air:
print("AIR");
m_CurrentAirCharges = r_State.GetCharges(); m_CurrentAirCharges = r_State.GetCharges();
if (m_ScalingActive) ScalePlayer(); if (m_ScalingActive)
{
ScalePlayer();
}
/*if(m_isRotating) { /*if(m_isRotating) {
SetRotationOrbsActive(true, r_State.GetCharges()); SetRotationOrbsActive(true, r_State.GetCharges());
...@@ -147,22 +152,28 @@ public class PlayerAnimation : MonoBehaviour ...@@ -147,22 +152,28 @@ public class PlayerAnimation : MonoBehaviour
public void ScalePlayer() public void ScalePlayer()
{ {
m_CurrentAirCharges = r_State.GetCharges(); m_CurrentAirCharges = r_State.GetCharges();
int diff = m_CurrentAirCharges - m_PreviousAirCharges; var scaleFactor = 1.0f + m_CurrentAirCharges * 0.2f;
//Debug.Log("current: " + currentCharges + " previous: " + m_PreviousCharges + " difference: " + diff); var direction = Mathf.Sign(this.gameObject.transform.localScale.x);
if (!m_isAnimating || m_isAnimating) var newScale = new Vector3(direction * scaleFactor * m_OriginScale.x, scaleFactor * m_OriginScale.x, 0.0f);
{ this.gameObject.transform.localScale = newScale;
if (diff > 0)
{
StartCoroutine(ScaleUp(m_PreviousAirCharges, m_CurrentAirCharges));
}
else
{
StartCoroutine(ScaleDown(m_PreviousAirCharges, m_CurrentAirCharges));
}
}
m_PreviousAirCharges = m_CurrentAirCharges; m_PreviousAirCharges = m_CurrentAirCharges;
// m_CurrentAirCharges = r_State.GetCharges();
// int diff = m_CurrentAirCharges - m_PreviousAirCharges;
// //Debug.Log("current: " + currentCharges + " previous: " + m_PreviousCharges + " difference: " + diff);
// if (!m_isAnimating || m_isAnimating)
// {
// if (diff > 0)
// {
// StartCoroutine(ScaleUp(m_PreviousAirCharges, m_CurrentAirCharges));
// }
// else
// {
// StartCoroutine(ScaleDown(m_PreviousAirCharges, m_CurrentAirCharges));
// }
// }
//
// m_PreviousAirCharges = m_CurrentAirCharges;
} }
private void ScaleReset() private void ScaleReset()
...@@ -172,23 +183,23 @@ public class PlayerAnimation : MonoBehaviour ...@@ -172,23 +183,23 @@ public class PlayerAnimation : MonoBehaviour
transform.localScale = s; transform.localScale = s;
} }
private IEnumerator ScaleUp(float from, float to) // private IEnumerator ScaleUp(float from, float to)
{ // {
m_isAnimating = true; // m_isAnimating = true;
float newSize = m_SizePerCharge * Mathf.Abs((to - from)); // float newSize = m_SizePerCharge * Mathf.Abs((to - from));
transform.localScale += new Vector3(newSize * Mathf.Sign(transform.localScale.x), newSize, newSize); // transform.localScale += new Vector3(newSize * Mathf.Sign(transform.localScale.x), newSize, newSize);
yield return null; // yield return null;
m_isAnimating = false; // m_isAnimating = false;
} // }
//
private IEnumerator ScaleDown(float from, float to) // private IEnumerator ScaleDown(float from, float to)
{ // {
m_isAnimating = true; // m_isAnimating = true;
float newSize = m_SizePerCharge * Mathf.Abs((to - from)); // float newSize = m_SizePerCharge * Mathf.Abs((to - from));
transform.localScale -= new Vector3(newSize * Mathf.Sign(transform.localScale.x), newSize, newSize); // transform.localScale -= new Vector3(newSize * Mathf.Sign(transform.localScale.x), newSize, newSize);
yield return null; // yield return null;
m_isAnimating = false; // m_isAnimating = false;
} // }
/*private IEnumerator ScaleUp(float from, float to) /*private IEnumerator ScaleUp(float from, float to)
......
...@@ -45,6 +45,11 @@ namespace _Game.Scripts.Player ...@@ -45,6 +45,11 @@ namespace _Game.Scripts.Player
_waterAttack.enabled = false; _waterAttack.enabled = false;
} }
private void OnDisable()
{
state.UpdateElement(InfusedElement.None);
}
private void Update() private void Update()
{ {
if (Input.GetButtonDown("Fire1")) if (Input.GetButtonDown("Fire1"))
......
...@@ -33,7 +33,7 @@ TagManager: ...@@ -33,7 +33,7 @@ TagManager:
- Enemy - Enemy
- MovableObject - MovableObject
- EnemyAttack - EnemyAttack
- - Background
- -
- -
- -
......
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