mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-30 05:23:06 +00:00
2453f9a48b
* 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
59 lines
No EOL
1.3 KiB
C#
59 lines
No EOL
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;
|
|
}
|
|
}
|
|
} |