mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-24 02:25:18 +00:00
c46f653612
* 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
56 lines
No EOL
1.4 KiB
C#
56 lines
No EOL
1.4 KiB
C#
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");
|
|
}
|
|
}
|
|
} |