mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-15 06:05:10 +00:00
ccfc528d99
* setup * scroll stuff * tons of stuff * totem bop * bopping and new assets * soem more * frog fit * fixed order of operation issue * triple proto * wow i love super curves * TRIPLE JUMP * frog fall * the spinny * dragon initial * functional dragon * fixed un bug * the deets * the deets have been fixed * miss stuff * smol fix * no log * fixed some issues * switch to next state * particle * remove useless logic * zoomed out * sound and line fix * new bg sheet * minor tweaks * pillar tops * background objects * background tweak * triple sound tweak * background rework * frog wings and new jump anim * fix * birds * disable pillars * landing end * fix again * minor fix * fixes and icon * background scroll logic rework * put in fixed sheet * fixed sounds
61 lines
1.8 KiB
C#
61 lines
1.8 KiB
C#
using HeavenStudio.Util;
|
|
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace HeavenStudio.Games.Scripts_TotemClimb
|
|
{
|
|
public class TCFrog : MonoBehaviour
|
|
{
|
|
[NonSerialized] public double beat;
|
|
|
|
[SerializeField] private Animator _animLeft;
|
|
[SerializeField] private Animator _animMiddle;
|
|
[SerializeField] private Animator _animRight;
|
|
[SerializeField] private Animator _anim;
|
|
|
|
[SerializeField] private Transform _jumperPointLeft;
|
|
[SerializeField] private Transform _jumperPointMiddle;
|
|
[SerializeField] private Transform _jumperPointRight;
|
|
|
|
public Transform JumperPointLeft => _jumperPointLeft;
|
|
public Transform JumperPointMiddle => _jumperPointMiddle;
|
|
public Transform JumperPointRight => _jumperPointRight;
|
|
|
|
private bool _hasWings = false;
|
|
private bool _flapSet = false; // I hate unity
|
|
|
|
private void Update()
|
|
{
|
|
if (!_anim.GetCurrentAnimatorStateInfo(0).IsName("Wings") && _hasWings && !_flapSet)
|
|
{
|
|
_anim.Play("Wings", 0, 0);
|
|
_flapSet = true;
|
|
}
|
|
}
|
|
|
|
public void FallPiece(int part)
|
|
{
|
|
if (_hasWings) _anim.Play("WingsNoFlap", 0, 0);
|
|
switch (part)
|
|
{
|
|
case -1:
|
|
_animLeft.DoScaledAnimationAsync("Fall", 0.5f);
|
|
break;
|
|
case 0:
|
|
_animMiddle.DoScaledAnimationAsync("Fall", 0.5f);
|
|
break;
|
|
default:
|
|
_animRight.DoScaledAnimationAsync("Fall", 0.5f);
|
|
break;
|
|
}
|
|
}
|
|
|
|
public void SetHasWings()
|
|
{
|
|
_hasWings = true;
|
|
}
|
|
}
|
|
}
|
|
|