示例#1
0
    void Start()
    {
        if (!isLocalPlayer)
        {
            return;
        }

        //use instance of UIShip to load module data it saved when player customized ship
        UIShip uis = gameObject.AddComponent <UIShip>();

        uis.shipName = shipName; //shipName defines which file will be used to load data
        uis.UpdatePath();        //update path to use correct shipName
        uis.Load();              //load saved data
        CmdLoadModules(uis.moduleList);
        Destroy(uis);
    }
 void Awake()
 {
     _instance = this;
 }