Guest User

Untitled

a guest
Jan 22nd, 2018
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class CoffreController : MonoBehaviour {
  6.  
  7. private bool isOpened;
  8. private GameObject ceCoffre;
  9. public Animator anim;
  10.  
  11. // Use this for initialization
  12. void Start () {
  13. isOpened = false;
  14. ceCoffre = GameObject.FindGameObjectWithTag("Coffre");
  15. anim = ceCoffre.GetComponent<Animator>();
  16. }
  17.  
  18. // Update is called once per frame
  19. void Update () {
  20. if(col.gameObject.tag == "Player") {
  21. isOpened = true;
  22. anim.Play ("CoffreOuvert");
  23. }
  24. }
  25. }
Add Comment
Please, Sign In to add comment