扩展系统组件方便调用提高效率
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public static class Extension : MonoBehaviour {
public static void setPosX(this Transform trans, float x)
{
trans.position = new Vector3(x,trans.position.y,trans.position.z);
}
}