49 lines
908 B
C#
49 lines
908 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class RobotAnimControl : CharacterAnimControlBase
|
|
{
|
|
float blinkTimer = 0;
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
if(blinkTimer <= 0)
|
|
{
|
|
animator.SetTrigger("blink");
|
|
blinkTimer = 5;
|
|
}
|
|
blinkTimer -= Time.deltaTime;
|
|
}
|
|
|
|
public override void StartSpeek()
|
|
{
|
|
animator.SetTrigger("speak");
|
|
}
|
|
public override void SayHi()
|
|
{
|
|
animator.SetTrigger("hi");
|
|
}
|
|
|
|
public override void Thinking()
|
|
{
|
|
//animator.SetTrigger("speek");
|
|
}
|
|
|
|
public override void Idle()
|
|
{
|
|
animator.SetTrigger("idle");
|
|
}
|
|
|
|
public override void Dance()
|
|
{
|
|
animator.SetTrigger("dance");
|
|
}
|
|
}
|