新增相关国旗内容

This commit is contained in:
2025-08-29 18:21:50 +08:00
parent 1fff9db9ca
commit 72f731b8bc
296 changed files with 728 additions and 22 deletions

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 8e4cf32f6efb45fba177341b57a34003
timeCreated: 1756450772

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 4c1174e9753b43ac9dd5fa664e92021b
timeCreated: 1756450590

View File

@@ -0,0 +1,7 @@
namespace NBF.Fishing2
{
public class UnitHelper
{
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 82c91df89554417c87a3658709ef406d
timeCreated: 1756450600

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 3148c2caaafd4a099b9bc156fce7a3f7
timeCreated: 1756450740

View 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);
}
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 18ffcf16981040b2a88990281adcb4ac
timeCreated: 1756451102

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 9a177be5539c4a5183d9838dcf22605d
timeCreated: 1756450754

View File

@@ -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>();
}
}
}

View File

@@ -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; }
}
}