目前找到的解决方案是用代码加Event: using System.Collections; using System.Collections.Generic; using UnityEngine; public class NewBehaviourScript : MonoBehaviour { public bool b = false; public bool b1 = true; public AnimationEvent mEvent; // Use this for initiali…
using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerControll : MonoBehaviour { Transform playerTransform; Animation playerAnimation; Rigidbody playerRigidbody; public float moveSpeed; public float jumpAbi…
Introduction 简介In previous chapters, you saw some of the reasons to use dependency injection and learned how dependency injection differs from other approaches to decoupling your application. In this chapter you'll see how you can use the Unity depen…