mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 10:07:38 +02:00
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
This commit is contained in:
56
Assets/Scripts/Games/SamuraiSliceNtr/NtrSamuraiChild.cs
Normal file
56
Assets/Scripts/Games/SamuraiSliceNtr/NtrSamuraiChild.cs
Normal file
@ -0,0 +1,56 @@
|
||||
using DG.Tweening;
|
||||
using NaughtyBezierCurves;
|
||||
using HeavenStudio.Util;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using DG.Tweening;
|
||||
using NaughtyBezierCurves;
|
||||
|
||||
namespace HeavenStudio.Games.Scripts_NtrSamurai
|
||||
{
|
||||
public class NtrSamuraiChild : MonoBehaviour
|
||||
{
|
||||
[Header("Transforms")]
|
||||
public Transform DebrisPosL;
|
||||
public Transform DebrisPosR;
|
||||
public Transform WalkPos0;
|
||||
public Transform WalkPos1;
|
||||
|
||||
[Header("Objects")]
|
||||
public Animator anim;
|
||||
|
||||
public float startBeat = Single.MinValue;
|
||||
public bool isMain = true;
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (!isMain)
|
||||
{
|
||||
var cond = Conductor.instance;
|
||||
float prog = Conductor.instance.GetPositionFromBeat(startBeat + 1f, 2f);
|
||||
if (prog >= 0)
|
||||
{
|
||||
Walk();
|
||||
transform.position = Vector3.Lerp(WalkPos0.position, WalkPos1.position, prog);
|
||||
if (prog >= 1f)
|
||||
{
|
||||
GameObject.Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void Bop()
|
||||
{
|
||||
anim.Play("ChildBeat", -1, 0);
|
||||
}
|
||||
|
||||
public void Walk()
|
||||
{
|
||||
anim.Play("ChildWalk");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user