pop-in animation on platform respawn

This commit is contained in:
Cat Flynn 2021-03-17 18:37:56 +00:00
parent 9037fd264c
commit af519d2ffe
3 changed files with 11 additions and 0 deletions

View File

@ -37,6 +37,12 @@ public class FallawayFloor : MonoBehaviour
if (_settings.FallawayFloor.CanRespawn) if (_settings.FallawayFloor.CanRespawn)
{ {
Reset(); Reset();
// pop in animation
transform.localScale = Vector3.zero;
transform
.DOScale(Vector3.one, 0.5f)
.SetEase(_settings.FallawayFloor.PopInEase);
} }
} }

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using DG.Tweening;
using Ktyl.Util; using Ktyl.Util;
using UnityEngine; using UnityEngine;
@ -24,6 +25,9 @@ public class TrapSettings : ScriptableObject
public float ShakeStrength => _shakeStrength; public float ShakeStrength => _shakeStrength;
[Header("Animation")] [Header("Animation")]
[SerializeField] private float _shakeStrength; [SerializeField] private float _shakeStrength;
public Ease PopInEase => _popInEase;
[SerializeField] private Ease _popInEase;
} }
public FallawayFloorSettings FallawayFloor => _fallawayFloor; public FallawayFloorSettings FallawayFloor => _fallawayFloor;
[SerializeField] private FallawayFloorSettings _fallawayFloor; [SerializeField] private FallawayFloorSettings _fallawayFloor;

View File

@ -17,3 +17,4 @@ MonoBehaviour:
_respawnTime: {fileID: 11400000, guid: 1d2951ab5083d4d48a319ff00a9eb8bd, type: 2} _respawnTime: {fileID: 11400000, guid: 1d2951ab5083d4d48a319ff00a9eb8bd, type: 2}
_safeTime: {fileID: 11400000, guid: 27c10a061baeec8469e96d4f995c1445, type: 2} _safeTime: {fileID: 11400000, guid: 27c10a061baeec8469e96d4f995c1445, type: 2}
_shakeStrength: 0.1 _shakeStrength: 0.1
_popInEase: 27