fix: show scene word and character.
feat: add script NPCmanager.
This commit is contained in:
@@ -174,6 +174,7 @@ GameObject:
|
||||
m_Component:
|
||||
- component: {fileID: 591506937}
|
||||
- component: {fileID: 591506936}
|
||||
- component: {fileID: 591506938}
|
||||
m_Layer: 0
|
||||
m_Name: GameSession
|
||||
m_TagString: Untagged
|
||||
@@ -208,6 +209,18 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &591506938
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 591506935}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 96073aa22df0eda49b4d56c0580aa806, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1654552490
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
using CSNetwork;
|
||||
using BrewMonster;
|
||||
using CSNetwork;
|
||||
using CSNetwork.GPDataType;
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using TMPro;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace PerfectWorld.Scripts.Managers
|
||||
{
|
||||
namespace BrewMonster.Managers
|
||||
{
|
||||
public class EC_ManPlayer : IMsgHandler
|
||||
public class EC_ManPlayer : IMsgHandler, IAutoInitialize
|
||||
{
|
||||
public int HandlerId => (int)MANAGER_INDEX.MAN_PLAYER;
|
||||
public bool ProcessMessage(ECMSG Msg)
|
||||
@@ -88,6 +90,10 @@ namespace PerfectWorld.Scripts.Managers
|
||||
|
||||
public bool HostPlayerInfo1(cmd_self_info_1 info)
|
||||
{
|
||||
string nameScene = "NPCRender";
|
||||
SceneManager.LoadScene(nameScene, LoadSceneMode.Single);
|
||||
nameScene = "WorldRender";
|
||||
SceneManager.LoadScene(nameScene, LoadSceneMode.Additive);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -153,6 +159,11 @@ namespace PerfectWorld.Scripts.Managers
|
||||
}
|
||||
return arrByteData;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class NPCManager : MonoBehaviour
|
||||
{
|
||||
private static NPCManager instance;
|
||||
|
||||
[SerializeField] private GameObject modelPlayerCharacter;
|
||||
|
||||
public static NPCManager Instance
|
||||
{
|
||||
get
|
||||
{
|
||||
if (instance == null)
|
||||
{
|
||||
instance = FindAnyObjectByType<NPCManager>();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
public GameObject GetModelPlayer()
|
||||
{
|
||||
var player = Instantiate(modelPlayerCharacter);
|
||||
return player;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 87558530baa52164fbafe0b6dc828de0
|
||||
@@ -6,8 +6,17 @@ EditorBuildSettings:
|
||||
serializedVersion: 2
|
||||
m_Scenes:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Demo.unity
|
||||
guid: 99c9720ab356a0642a771bea13969a05
|
||||
path: Assets/PerfectWorld/Scene/Boostrap.unity
|
||||
guid: 40f9b53766c74f541b85df4d35cfc767
|
||||
- enabled: 1
|
||||
path: Assets/PerfectWorld/Scene/LoginScene.unity
|
||||
guid: 48fc9d6a0ce7ade4ba2075f927f8e305
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/NPCRender.unity
|
||||
guid: a104c7e42c2924c12843255c6bab3a8b
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/WorldRender.unity
|
||||
guid: 6d5fa77a0ed1542c8a76520fd198c7f1
|
||||
m_configObjects:
|
||||
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 052faaac586de48259a63d0c4782560b, type: 3}
|
||||
m_UseUCBPForAssetBundles: 0
|
||||
|
||||
Reference in New Issue
Block a user