示例#1
0
 void Start()
 {
     if (current == null)
     {
         current = this;
         DontDestroyOnLoad(gameObject);
     }
     else
     {
         Destroy(gameObject);
     }
 }
        void Start()
        {
            HudController obj = Instantiate(prefabHUD);

            obj.player = this;
        }