soundvision/UnityProject/Assets/Scenes/Examples/MIDI/script/OrangeCubeScript.cs
2019-10-31 18:37:03 +01:00

30 lines
478 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class OrangeCubeScript : MonoBehaviour
{
public bool go;
private Animator anim;
void Start()
{
anim = GetComponent<Animator>();
}
public void Go()
{
go = true;
}
private void Update()
{
if (go == true)
{
gameObject.GetComponent<Animator>().SetTrigger("AnimTrigger");
}
}
}