using System.Collections; using System.Collections.Generic; using UnityEngine; public class Ladder : MonoBehaviour { public static Ladder instance; SkinnedMeshRenderer smr; float weight; bool show = false; public void Awake() { instance = this; } public void Init() { smr = transform.GetComponent(); show = true; } public void closed() { show = false; } void Update() { if (show == false) return; if (weight < 100f) { weight += 1.8f; smr.SetBlendShapeWeight(0, weight); } } }