新增相关国旗内容
This commit is contained in:
3
Assets/Scripts/Fishing2/Data/Helper.meta
Normal file
3
Assets/Scripts/Fishing2/Data/Helper.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e4cf32f6efb45fba177341b57a34003
|
||||
timeCreated: 1756450772
|
||||
3
Assets/Scripts/Fishing2/Helper.meta
Normal file
3
Assets/Scripts/Fishing2/Helper.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4c1174e9753b43ac9dd5fa664e92021b
|
||||
timeCreated: 1756450590
|
||||
7
Assets/Scripts/Fishing2/Helper/UnitHelper.cs
Normal file
7
Assets/Scripts/Fishing2/Helper/UnitHelper.cs
Normal file
@@ -0,0 +1,7 @@
|
||||
namespace NBF.Fishing2
|
||||
{
|
||||
public class UnitHelper
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
3
Assets/Scripts/Fishing2/Helper/UnitHelper.cs.meta
Normal file
3
Assets/Scripts/Fishing2/Helper/UnitHelper.cs.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 82c91df89554417c87a3658709ef406d
|
||||
timeCreated: 1756450600
|
||||
3
Assets/Scripts/Fishing2/View/Helper.meta
Normal file
3
Assets/Scripts/Fishing2/View/Helper.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3148c2caaafd4a099b9bc156fce7a3f7
|
||||
timeCreated: 1756450740
|
||||
18
Assets/Scripts/Fishing2/View/Helper/PrefabsHelper.cs
Normal file
18
Assets/Scripts/Fishing2/View/Helper/PrefabsHelper.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF.Fishing2
|
||||
{
|
||||
public static class PrefabsHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// 创建角色预制体
|
||||
/// </summary>
|
||||
/// <param name="parent"></param>
|
||||
/// <returns></returns>
|
||||
public static GameObject CreatePlayer(Transform parent)
|
||||
{
|
||||
var model = Resources.Load<GameObject>("Prefabs/Player/male");
|
||||
return Object.Instantiate(model, parent);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 18ffcf16981040b2a88990281adcb4ac
|
||||
timeCreated: 1756451102
|
||||
3
Assets/Scripts/Fishing2/View/Map.meta
Normal file
3
Assets/Scripts/Fishing2/View/Map.meta
Normal file
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9a177be5539c4a5183d9838dcf22605d
|
||||
timeCreated: 1756450754
|
||||
@@ -11,6 +11,7 @@ namespace NBF.Fishing2
|
||||
protected override void Awake(UnitUnityComponent self)
|
||||
{
|
||||
Log.Info("UnitUnityComponentAwakeSystem");
|
||||
self.InitGameObject();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,13 +24,16 @@ namespace NBF.Fishing2
|
||||
self.Transform = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static void SetGameObject(this UnitUnityComponent self, GameObject obj)
|
||||
public static void InitGameObject(this UnitUnityComponent self)
|
||||
{
|
||||
Log.Info("UnitUnityComponent SetGameObject");
|
||||
self.GameObject = obj;
|
||||
self.Transform = obj.transform;
|
||||
self.Animator = obj.GetComponent<Animator>();
|
||||
var unit = self.Parent as Unit;
|
||||
var prefab = PrefabsHelper.CreatePlayer(SceneSettings.Instance.Node);
|
||||
|
||||
self.GameObject = prefab;
|
||||
self.Transform = prefab.transform;
|
||||
self.Animator = prefab.GetComponent<Animator>();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,4 @@
|
||||
using NBC;
|
||||
using NBC.Entitas;
|
||||
using NBC.Entitas.Interface;
|
||||
using NBC.Entitas;
|
||||
using UnityEngine;
|
||||
|
||||
namespace NBF.Fishing2
|
||||
@@ -16,5 +14,4 @@ namespace NBF.Fishing2
|
||||
|
||||
public Animator Animator { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user