mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-12-03 06:47:31 +00:00
455692a2cd
* Got the inputs and audio in * Fixed some things * kick anim * more stuff * anim stuff * particle mistake oops * Oops. I am sorry * Implemented visual stuff * Made animations scaled to be faster * Fixes * lots of anims * More anims implemented --------- Co-authored-by: Rapandrasmus <78219215+Rapandrasmus@users.noreply.github.com> Co-authored-by: minenice55 <star.elementa@gmail.com>
50 lines
1.3 KiB
C#
50 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
using HeavenStudio.Util;
|
|
|
|
namespace HeavenStudio.Games.Scripts_DoubleDate
|
|
{
|
|
public class Basketball : PlayerActionObject
|
|
{
|
|
private DoubleDate game;
|
|
|
|
void Awake()
|
|
{
|
|
game = DoubleDate.instance;
|
|
}
|
|
|
|
public void Init(float beat)
|
|
{
|
|
game.ScheduleInput(beat, 1f, InputType.STANDARD_DOWN, Just, Miss, Empty);
|
|
}
|
|
|
|
void Just(PlayerActionEvent caller, float state)
|
|
{
|
|
if (state >= 1f || state <= -1f)
|
|
{
|
|
Jukebox.PlayOneShot("miss");
|
|
game.Kick(false);
|
|
Destroy(gameObject); //Remove this when doing the ball movement
|
|
return;
|
|
}
|
|
Hit();
|
|
}
|
|
|
|
void Hit()
|
|
{
|
|
game.Kick();
|
|
Jukebox.PlayOneShotGame("doubleDate/kick");
|
|
Destroy(gameObject); //Remove this when doing the ball movement
|
|
}
|
|
|
|
void Miss(PlayerActionEvent caller)
|
|
{
|
|
Jukebox.PlayOneShotGame("doubleDate/weasel_hide");
|
|
Destroy(gameObject); //Remove this when doing the ball movement
|
|
}
|
|
|
|
void Empty(PlayerActionEvent caller) { }
|
|
}
|
|
}
|