HeavenStudio/Assets/Scripts/Games/SamuraiSliceNtr/NtrSamurai.cs
minenice55 c46f653612
Minigame: Samurai Slice (Gold) (#79)
* Game: Samurai Slice (DS)

initial scene setup

* Samurai Slice (Gold) - Start animations

* Samurai Slice (Gold) - Finish core samurai animations

* Samurai Slice (Gold) - Basic interactions

* Samurai Slice (Gold): object prep

* Samurai Slice (Gold): object type setup

* Samurai Slice (Gold): object paths

* Samurai Slice (Gold): prep for other objects

* Samurai Slice (Gold): prep fish

* Samurai Slice (Gold): Objects complete

* Samurai Slice (Gold): dinero

quiero cien vbucks

* Samurai Slice (Gold): polish cash, slicing anim

* Samurai Slice (Gold): child catching

* Samurai Slice (Gold): feature complete
2022-05-15 22:29:26 -07:00

59 lines
1.3 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace HeavenStudio.Games.Scripts_NtrSamurai
{
public class NtrSamurai : MonoBehaviour
{
[Header("References")]
public Animator animator;
[Header("Properties")]
public bool stepping;
public void Init()
{
stepping = false;
}
// Update is called once per frame
void Update()
{
}
public void Bop()
{
if (!stepping && !(animator.GetCurrentAnimatorClipInfo(0)[0].clip.name == "Slash"))
animator.Play("Beat", -1, 0);
}
public void Step(bool off)
{
stepping = !off;
if (off)
{
animator.Play("Beat", -1, 0);
}
else
{
if (animator.GetCurrentAnimatorClipInfo(0)[0].clip.name == "Slash")
animator.Play("StepSeathe", -1, 0);
else
animator.Play("Step", -1, 0);
}
}
public void Slash()
{
stepping = false;
animator.Play("Slash", -1, 0);
}
public bool isStepping()
{
return stepping;
}
}
}