Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Anim : MonoBehaviour {
- Animation anim;
- void Start() {
- anim = GetComponent<Animation>();
- }
- void Update() {
- if (Input.GetKeyDown(KeyCode.P))
- anim.Play("Coin");
- if (Input.GetKeyDown(KeyCode.S))
- anim.Stop("Coin");
- }
- public void Triggered() {
- Debug.Log("Анимация закончилась");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement