mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-14 05:35:08 +00:00
8ccced19b6
* 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>
51 lines
1.3 KiB
C#
51 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
using HeavenStudio.Util;
|
|
|
|
namespace HeavenStudio.Games.Scripts_DoubleDate
|
|
{
|
|
public class Football : PlayerActionObject
|
|
{
|
|
private DoubleDate game;
|
|
|
|
void Awake()
|
|
{
|
|
game = DoubleDate.instance;
|
|
}
|
|
|
|
public void Init(float beat)
|
|
{
|
|
game.ScheduleInput(beat, 1.5f, 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(true, true);
|
|
Jukebox.PlayOneShotGame("doubleDate/footballKick");
|
|
Destroy(gameObject); //Remove this when doing the ball movement
|
|
}
|
|
|
|
void Miss(PlayerActionEvent caller)
|
|
{
|
|
Jukebox.PlayOneShotGame("doubleDate/weasel_hit");
|
|
Jukebox.PlayOneShotGame("doubleDate/weasel_scream");
|
|
Destroy(gameObject); //Remove this when doing the ball movement
|
|
}
|
|
|
|
void Empty(PlayerActionEvent caller) { }
|
|
}
|
|
}
|