HeavenStudio/Assets/Scripts/Games/DoubleDate/Football.cs
ev 455692a2cd
Double Date (#366)
* 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>
2023-03-27 03:12:23 +00:00

52 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) { }
}
}