private float characterHeight = 1f; //角色寬度 private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this); } else if (this != instance) { Destroy(gameObject); } }
private void Awake() { planner = FindObjectOfType <SeatingPlanner>(); canvas = FindObjectOfType <Canvas>(); }
private void Start() { seatingPlanner = FindObjectOfType <SeatingPlanner>(); gameObject.name = SeatIndexHelper.SeatIndexToKeyCode(index); }