Combine_action.cs
759 Bytes
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Combine_action : MonoBehaviour
{
public Animator Animator;
public RuntimeAnimatorController random;
public RuntimeAnimatorController interact;
public void switch_to_interact()
{
gameObject.GetComponent<Husky_script>().enabled = false;
Animator.runtimeAnimatorController = interact;
}
public void switch_to_random()
{
Animator.runtimeAnimatorController = random;
gameObject.GetComponent<Husky_script>().enabled = true;
}
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}