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 platform : MonoBehaviour
- {
- Collider BoxCollider;
- Animator ani;
- // Start is called before the first frame update
- void Start()
- {ani = gameObject.GetComponent<Animator>();
- }
- // Update is called once per frame
- void Update()
- {
- BoxCollider = GetComponent<Collider>();
- if (ani.SetBool ("Platform", false));
- {
- BoxCollider.isTrigger = true;
- }
- if (ani.SetBool ("Platform", true));
- {
- BoxCollider.isTrigger = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement