65 changed files with 1861 additions and 115 deletions
Binary file not shown.
@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<component size="1280,720" pivot="0.5,0.5"> |
||||
<controller name="farmlandState" pages="0,空闲,1,已经播种,3,生长,4,成熟" selected="3"/> |
||||
<controller name="hasPeople" pages="0,,1," selected="0"/> |
||||
<displayList> |
||||
<graph id="n1_nrka" name="n1" xy="140,570" size="1000,150" group="n4_nrka" type="rect"/> |
||||
<list id="n0_nrka" name="PlantSeedList" xy="164,591" size="800,110" group="n4_nrka" layout="row" overflow="scroll" scroll="horizontal" margin="5,5,0,0" lineGap="5" colGap="5" defaultItem="ui://2126z1eanrkav" autoClearItems="true"> |
||||
<item/> |
||||
<item/> |
||||
<item/> |
||||
<item/> |
||||
<item/> |
||||
</list> |
||||
<component id="n2_nrka" name="ConfirmSeedButton" src="nd6r3" fileName="GreenButton.xml" xy="993,618" size="134,53" group="n4_nrka"> |
||||
<Button title="确定"/> |
||||
</component> |
||||
<graph id="n3_nrka" name="n3" xy="979,596" size="2,100" group="n4_nrka" type="rect" fillColor="#ff000000"/> |
||||
<component id="n7_nrka" name="SeedInfoPopup" src="nrkaw" fileName="Farmland/SeedInfoPopup.xml" xy="143,403" group="n4_nrka"/> |
||||
<group id="n4_nrka" name="SeedPanel" xy="140,403" size="1000,317" advanced="true"> |
||||
<gearDisplay controller="farmlandState" pages="0"/> |
||||
</group> |
||||
<graph id="n8_sp3r" name="n8" xy="240,570" size="800,150" group="n9_sp3r" type="rect"/> |
||||
<graph id="n10_sp3r" name="n10" xy="872,599" size="2,100" group="n9_sp3r" type="rect" fillColor="#ff000000"/> |
||||
<loader id="n11_sp3r" name="WaitForPlant_CropIcon" xy="538,606" size="90,90" group="n9_sp3r" align="center" vAlign="middle" fill="scale"/> |
||||
<text id="n12_sp3r" name="n12" xy="645,609" size="52,24" group="n9_sp3r" fontSize="16" text="状态:"/> |
||||
<text id="n13_sp3r" name="WaitForPlantText" xy="697,609" size="52,24" group="n9_sp3r" fontSize="16" ubb="true" text="待播种"/> |
||||
<text id="n14_sp3r" name="n14" xy="645,671" size="52,24" group="n9_sp3r" fontSize="16" text="产量:"/> |
||||
<text id="n15_sp3r" name="n15" xy="698,671" size="21,24" group="n9_sp3r" fontSize="16" text="---"/> |
||||
<component id="n36_ifd4" name="WFP_FarmerIconButton" src="ifd4x" fileName="Farmland/IconButton.xml" xy="906,595" group="n9_sp3r"> |
||||
<gearDisplay controller="hasPeople" pages="1"/> |
||||
</component> |
||||
<component id="n16_sp3r" name="AddPlantPeopleButton" src="nd6r3" fileName="GreenButton.xml" xy="906,596" size="100,100" group="n9_sp3r"> |
||||
<gearDisplay controller="hasPeople" pages="0"/> |
||||
<Button title="+"/> |
||||
</component> |
||||
<group id="n9_sp3r" name="WaitForPlantPanel" xy="240,570" size="800,150" advanced="true"> |
||||
<gearDisplay controller="farmlandState" pages="1"/> |
||||
</group> |
||||
<graph id="n18_hm6k" name="n18" xy="240,570" size="800,150" group="n26_hm6k" type="rect"/> |
||||
<graph id="n19_hm6k" name="n19" xy="872,599" size="2,100" group="n26_hm6k" type="rect" fillColor="#ff000000"/> |
||||
<loader id="n20_hm6k" name="Grow_CropIcon" xy="538,606" size="90,90" group="n26_hm6k" align="center" vAlign="middle" fill="scale"/> |
||||
<text id="n21_hm6k" name="n21" xy="645,609" size="52,24" group="n26_hm6k" fontSize="16" text="状态:"/> |
||||
<text id="n22_hm6k" name="GrowText" xy="697,609" size="52,24" group="n26_hm6k" fontSize="16" ubb="true" text="待播种"/> |
||||
<text id="n23_hm6k" name="n23" xy="645,671" size="52,24" group="n26_hm6k" fontSize="16" text="产量:"/> |
||||
<text id="n24_hm6k" name="Grow_ProductionNum" xy="698,671" size="21,24" group="n26_hm6k" fontSize="16" ubb="true" text="---"/> |
||||
<component id="n25_hm6k" name="GrowSpeedUpButton" src="nd6r3" fileName="GreenButton.xml" xy="906,622" size="100,50" group="n26_hm6k"> |
||||
<Button title="加速"/> |
||||
</component> |
||||
<group id="n26_hm6k" name="GrowPanel" xy="240,570" size="800,150" advanced="true"> |
||||
<gearDisplay controller="farmlandState" pages="3"/> |
||||
</group> |
||||
<graph id="n27_ifd4" name="n27" xy="240,570" size="800,150" group="n35_ifd4" type="rect"/> |
||||
<graph id="n28_ifd4" name="n28" xy="872,599" size="2,100" group="n35_ifd4" type="rect" fillColor="#ff000000"/> |
||||
<loader id="n29_ifd4" name="Harvest_CropIcon" xy="538,606" size="90,90" group="n35_ifd4" align="center" vAlign="middle" fill="scale"/> |
||||
<text id="n30_ifd4" name="n30" xy="645,609" size="52,24" group="n35_ifd4" fontSize="16" text="状态:"/> |
||||
<text id="n31_ifd4" name="HarvestText" xy="697,609" size="52,24" group="n35_ifd4" fontSize="16" ubb="true" text="已成熟"/> |
||||
<text id="n32_ifd4" name="n32" xy="645,671" size="52,24" group="n35_ifd4" fontSize="16" text="产量:"/> |
||||
<text id="n33_ifd4" name="Harvest_ProductionNum" xy="698,671" size="21,24" group="n35_ifd4" fontSize="16" ubb="true" text="---"/> |
||||
<component id="n34_ifd4" name="HarvestButton" src="nd6r3" fileName="GreenButton.xml" xy="906,596" size="100,100" group="n35_ifd4"> |
||||
<gearDisplay controller="hasPeople" pages="0"/> |
||||
<Button title="+"/> |
||||
</component> |
||||
<component id="n37_ifd4" name="Harvest_FarmerIconButton" src="ifd4x" fileName="Farmland/IconButton.xml" xy="906,596" group="n35_ifd4"> |
||||
<gearDisplay controller="hasPeople" pages="1"/> |
||||
</component> |
||||
<group id="n35_ifd4" name="HarvestPanel" xy="240,570" size="800,150" advanced="true"> |
||||
<gearDisplay controller="farmlandState" pages="4"/> |
||||
</group> |
||||
<component id="n17_sp3r" name="RemoveButton" src="nd6r3" fileName="GreenButton.xml" xy="20,670" size="114,49"> |
||||
<Button title="拆除"/> |
||||
</component> |
||||
<component id="n5_nrka" name="CloseButton" src="nd6r3" fileName="GreenButton.xml" xy="1011,545" size="53,49"> |
||||
<gearXY controller="farmlandState" pages="1,3,4" values="1011,547|1011,545|1011,545" default="1111,545"/> |
||||
<Button title="X"/> |
||||
</component> |
||||
</displayList> |
||||
</component> |
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<component size="100,100" extention="Button"> |
||||
<displayList> |
||||
<loader id="n0_ifd4" name="Icon" xy="0,0" size="100,100" align="center" vAlign="middle" fill="scale"/> |
||||
<text id="n1_ifd4" name="Name" xy="32,76" size="36,24" fontSize="16" align="center" vAlign="middle" text="人名"/> |
||||
</displayList> |
||||
<Button/> |
||||
</component> |
@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<component size="100,100" extention="Button"> |
||||
<controller name="button" pages="0,up,1,down,2,over,3,selectedOver" selected="0"/> |
||||
<controller name="state" pages="0,,1,,2," selected="1"/> |
||||
<displayList> |
||||
<graph id="n0_nrka" name="n0" xy="0,0" size="100,100" touchable="false" type="rect" lineSize="0" fillColor="#fff0f0f0"> |
||||
<gearDisplay controller="button" pages="0"/> |
||||
<relation target="" sidePair="width-width,height-height"/> |
||||
</graph> |
||||
<graph id="n1_nrka" name="n1" xy="0,0" size="100,100" touchable="false" type="rect" lineSize="0" fillColor="#fffafafa"> |
||||
<gearDisplay controller="button" pages="2"/> |
||||
<relation target="" sidePair="width-width,height-height"/> |
||||
</graph> |
||||
<graph id="n2_nrka" name="n2" xy="0,0" size="100,100" touchable="false" type="rect" lineSize="0" fillColor="#ffcccccc"> |
||||
<gearDisplay controller="button" pages="1,3"/> |
||||
<relation target="" sidePair="width-width,height-height"/> |
||||
</graph> |
||||
<loader id="n4_nrka" name="Icon" xy="5,5" size="90,90" align="center" vAlign="middle" fill="scale"/> |
||||
<text id="n3_nrka" name="Name" xy="24,75" size="52,24" fontSize="16" align="center" vAlign="middle" text="种子名"/> |
||||
<text id="n5_nrka" name="n5" xy="76,-8" size="36,24" rotation="30" fontSize="16" color="#ff0000" align="center" text="不可"> |
||||
<gearDisplay controller="state" pages="1"/> |
||||
</text> |
||||
<text id="n6_nrka" name="n6" xy="76,-8" size="36,24" rotation="30" fontSize="16" color="#ff0000" align="center" text="不足"> |
||||
<gearDisplay controller="state" pages="2"/> |
||||
</text> |
||||
</displayList> |
||||
<Button mode="Radio"/> |
||||
</component> |
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<component size="250,160"> |
||||
<displayList> |
||||
<graph id="n0_nrka" name="n0" xy="0,0" size="250,160" type="rect"/> |
||||
<graph id="n1_nrka" name="n1" xy="15,48" size="220,2" type="rect" fillColor="#ff000000"/> |
||||
<text id="n2_nrka" name="Name" xy="15,11" size="100,29" fontSize="20" autoSize="shrink" text="作物名称"/> |
||||
<text id="n3_nrka" name="NeedNum" xy="152,11" size="80,29" fontSize="20" align="right" ubb="true" autoSize="shrink" text="9999/30"/> |
||||
<text id="n4_nrka" name="n4" xy="18,64" size="84,24" fontSize="16" align="right" text="播种季节:"/> |
||||
<text id="n5_nrka" name="n5" xy="18,111" size="84,24" fontSize="16" align="right" text="生长时间:"/> |
||||
<text id="n6_nrka" name="Season" xy="109,63" size="52,24" fontSize="16" align="right" text="春、夏"/> |
||||
<text id="n7_nrka" name="GrowTime" xy="111,111" size="46,24" fontSize="16" align="right" text="999日"/> |
||||
</displayList> |
||||
</component> |
Binary file not shown.
@ -0,0 +1,21 @@
|
||||
using ET.EventType; |
||||
|
||||
namespace ET |
||||
{ |
||||
public class PeopleMoveEnd_StartFarm : AEvent<EventType.PeopleMoveEnd> |
||||
{ |
||||
protected override void Run(PeopleMoveEnd args) |
||||
{ |
||||
var people = args.People; |
||||
var unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene()); |
||||
|
||||
int behave = people.GetBehaveType(); |
||||
var targetId = people.GetTargetId(); |
||||
if (behave == ConstBehaveType.BEHAVE_PREPARE_PLANT) |
||||
{ |
||||
var farmland = unit.GetGrandChild<Farmland>(targetId); |
||||
FarmlandHelper.StartFarmlandPlant(unit, people, farmland).Coroutine(); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,21 @@
|
||||
using ET.EventType; |
||||
|
||||
namespace ET |
||||
{ |
||||
public class PeopleMoveEnd_StartHarvest : AEvent<EventType.PeopleMoveEnd> |
||||
{ |
||||
protected override void Run(PeopleMoveEnd args) |
||||
{ |
||||
var people = args.People; |
||||
var unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene()); |
||||
|
||||
int behave = people.GetBehaveType(); |
||||
var targetId = people.GetTargetId(); |
||||
if (behave == ConstBehaveType.BEHAVE_PREPARE_HARVEST) |
||||
{ |
||||
var farmland = unit.GetGrandChild<Farmland>(targetId); |
||||
FarmlandHelper.StartFarmlandHarvest(unit, people, farmland).Coroutine(); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,150 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
using FairyGUI; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace ET |
||||
{ |
||||
namespace FUIBuilding |
||||
{ |
||||
public class FUI_FarmlandWindowAwakeSystem : AwakeSystem<FUI_FarmlandWindow> |
||||
{ |
||||
public override void Awake(FUI_FarmlandWindow self) |
||||
{ |
||||
self.Awake(); |
||||
} |
||||
} |
||||
|
||||
public class FUI_FarmlandWindowDestroySystem : DestroySystem<FUI_FarmlandWindow> |
||||
{ |
||||
public override void Destroy(FUI_FarmlandWindow self) |
||||
{ |
||||
self.Destroy(); |
||||
} |
||||
} |
||||
|
||||
[FriendClass(typeof(FUI))] |
||||
[FriendClass(typeof(FUI_FarmlandWindow))] |
||||
public static class FUI_FarmlandWindowSystem |
||||
{ |
||||
|
||||
public static void Awake(this FUI_FarmlandWindow self) |
||||
{ |
||||
var fui = self.GetParent<FUI>(); |
||||
if(fui.GObject == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
self.FGComp = (GComponent)fui.GObject; |
||||
|
||||
self.FGComp.Add(fui); |
||||
|
||||
var com = fui.GObject.asCom; |
||||
|
||||
if(com != null) |
||||
{ |
||||
|
||||
self.m_farmlandState = com.GetControllerAt(0); |
||||
self.m_hasPeople = com.GetControllerAt(1); |
||||
self.m_n1 = (GGraph)com.GetChildAt(0); |
||||
self.m_PlantSeedList = (GList)com.GetChildAt(1); |
||||
self.m_ConfirmSeedButton = FUIHelper.Create<FUI_GreenButton>(self, com.GetChildAt(2)); |
||||
self.m_n3 = (GGraph)com.GetChildAt(3); |
||||
self.m_SeedInfoPopup = FUIHelper.Create<FUI_SeedInfoPopup>(self, com.GetChildAt(4)); |
||||
self.m_SeedPanel = (GGroup)com.GetChildAt(5); |
||||
self.m_n8 = (GGraph)com.GetChildAt(6); |
||||
self.m_n10 = (GGraph)com.GetChildAt(7); |
||||
self.m_WaitForPlant_CropIcon = (GLoader)com.GetChildAt(8); |
||||
self.m_n12 = (GTextField)com.GetChildAt(9); |
||||
self.m_WaitForPlantText = (GTextField)com.GetChildAt(10); |
||||
self.m_n14 = (GTextField)com.GetChildAt(11); |
||||
self.m_n15 = (GTextField)com.GetChildAt(12); |
||||
self.m_WFP_FarmerIconButton = FUIHelper.Create<FUI_IconButton>(self, com.GetChildAt(13)); |
||||
self.m_AddPlantPeopleButton = FUIHelper.Create<FUI_GreenButton>(self, com.GetChildAt(14)); |
||||
self.m_WaitForPlantPanel = (GGroup)com.GetChildAt(15); |
||||
self.m_n18 = (GGraph)com.GetChildAt(16); |
||||
self.m_n19 = (GGraph)com.GetChildAt(17); |
||||
self.m_Grow_CropIcon = (GLoader)com.GetChildAt(18); |
||||
self.m_n21 = (GTextField)com.GetChildAt(19); |
||||
self.m_GrowText = (GTextField)com.GetChildAt(20); |
||||
self.m_n23 = (GTextField)com.GetChildAt(21); |
||||
self.m_Grow_ProductionNum = (GTextField)com.GetChildAt(22); |
||||
self.m_GrowSpeedUpButton = FUIHelper.Create<FUI_GreenButton>(self, com.GetChildAt(23)); |
||||
self.m_GrowPanel = (GGroup)com.GetChildAt(24); |
||||
self.m_n27 = (GGraph)com.GetChildAt(25); |
||||
self.m_n28 = (GGraph)com.GetChildAt(26); |
||||
self.m_Harvest_CropIcon = (GLoader)com.GetChildAt(27); |
||||
self.m_n30 = (GTextField)com.GetChildAt(28); |
||||
self.m_HarvestText = (GTextField)com.GetChildAt(29); |
||||
self.m_n32 = (GTextField)com.GetChildAt(30); |
||||
self.m_Harvest_ProductionNum = (GTextField)com.GetChildAt(31); |
||||
self.m_HarvestButton = FUIHelper.Create<FUI_GreenButton>(self, com.GetChildAt(32)); |
||||
self.m_Harvest_FarmerIconButton = FUIHelper.Create<FUI_IconButton>(self, com.GetChildAt(33)); |
||||
self.m_HarvestPanel = (GGroup)com.GetChildAt(34); |
||||
self.m_RemoveButton = FUIHelper.Create<FUI_GreenButton>(self, com.GetChildAt(35)); |
||||
self.m_CloseButton = FUIHelper.Create<FUI_GreenButton>(self, com.GetChildAt(36)); |
||||
} |
||||
} |
||||
|
||||
public static void Destroy(this FUI_FarmlandWindow self) |
||||
{ |
||||
if(self.IsDisposed) |
||||
{ |
||||
return; |
||||
} |
||||
self.FGComp.Remove(); |
||||
self.FGComp = null; |
||||
|
||||
self.m_farmlandState = null; |
||||
self.m_hasPeople = null; |
||||
self.m_n1 = null; |
||||
self.m_PlantSeedList = null; |
||||
self.m_ConfirmSeedButton.Dispose(); |
||||
self.m_ConfirmSeedButton = null; |
||||
self.m_n3 = null; |
||||
self.m_SeedInfoPopup.Dispose(); |
||||
self.m_SeedInfoPopup = null; |
||||
self.m_SeedPanel = null; |
||||
self.m_n8 = null; |
||||
self.m_n10 = null; |
||||
self.m_WaitForPlant_CropIcon = null; |
||||
self.m_n12 = null; |
||||
self.m_WaitForPlantText = null; |
||||
self.m_n14 = null; |
||||
self.m_n15 = null; |
||||
self.m_WFP_FarmerIconButton.Dispose(); |
||||
self.m_WFP_FarmerIconButton = null; |
||||
self.m_AddPlantPeopleButton.Dispose(); |
||||
self.m_AddPlantPeopleButton = null; |
||||
self.m_WaitForPlantPanel = null; |
||||
self.m_n18 = null; |
||||
self.m_n19 = null; |
||||
self.m_Grow_CropIcon = null; |
||||
self.m_n21 = null; |
||||
self.m_GrowText = null; |
||||
self.m_n23 = null; |
||||
self.m_Grow_ProductionNum = null; |
||||
self.m_GrowSpeedUpButton.Dispose(); |
||||
self.m_GrowSpeedUpButton = null; |
||||
self.m_GrowPanel = null; |
||||
self.m_n27 = null; |
||||
self.m_n28 = null; |
||||
self.m_Harvest_CropIcon = null; |
||||
self.m_n30 = null; |
||||
self.m_HarvestText = null; |
||||
self.m_n32 = null; |
||||
self.m_Harvest_ProductionNum = null; |
||||
self.m_HarvestButton.Dispose(); |
||||
self.m_HarvestButton = null; |
||||
self.m_Harvest_FarmerIconButton.Dispose(); |
||||
self.m_Harvest_FarmerIconButton = null; |
||||
self.m_HarvestPanel = null; |
||||
self.m_RemoveButton.Dispose(); |
||||
self.m_RemoveButton = null; |
||||
self.m_CloseButton.Dispose(); |
||||
self.m_CloseButton = null; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,67 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
using FairyGUI; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace ET |
||||
{ |
||||
namespace FUIBuilding |
||||
{ |
||||
public class FUI_IconButtonAwakeSystem : AwakeSystem<FUI_IconButton> |
||||
{ |
||||
public override void Awake(FUI_IconButton self) |
||||
{ |
||||
self.Awake(); |
||||
} |
||||
} |
||||
|
||||
public class FUI_IconButtonDestroySystem : DestroySystem<FUI_IconButton> |
||||
{ |
||||
public override void Destroy(FUI_IconButton self) |
||||
{ |
||||
self.Destroy(); |
||||
} |
||||
} |
||||
|
||||
[FriendClass(typeof(FUI))] |
||||
[FriendClass(typeof(FUI_IconButton))] |
||||
public static class FUI_IconButtonSystem |
||||
{ |
||||
|
||||
public static void Awake(this FUI_IconButton self) |
||||
{ |
||||
var fui = self.GetParent<FUI>(); |
||||
if(fui.GObject == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
self.FGComp = (GButton)fui.GObject; |
||||
|
||||
self.FGComp.Add(fui); |
||||
|
||||
var com = fui.GObject.asCom; |
||||
|
||||
if(com != null) |
||||
{ |
||||
|
||||
self.m_Icon = (GLoader)com.GetChildAt(0); |
||||
self.m_Name = (GTextField)com.GetChildAt(1); |
||||
} |
||||
} |
||||
|
||||
public static void Destroy(this FUI_IconButton self) |
||||
{ |
||||
if(self.IsDisposed) |
||||
{ |
||||
return; |
||||
} |
||||
self.FGComp.Remove(); |
||||
self.FGComp = null; |
||||
|
||||
self.m_Icon = null; |
||||
self.m_Name = null; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,81 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
using FairyGUI; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace ET |
||||
{ |
||||
namespace FUIBuilding |
||||
{ |
||||
public class FUI_PlantSeedItemAwakeSystem : AwakeSystem<FUI_PlantSeedItem> |
||||
{ |
||||
public override void Awake(FUI_PlantSeedItem self) |
||||
{ |
||||
self.Awake(); |
||||
} |
||||
} |
||||
|
||||
public class FUI_PlantSeedItemDestroySystem : DestroySystem<FUI_PlantSeedItem> |
||||
{ |
||||
public override void Destroy(FUI_PlantSeedItem self) |
||||
{ |
||||
self.Destroy(); |
||||
} |
||||
} |
||||
|
||||
[FriendClass(typeof(FUI))] |
||||
[FriendClass(typeof(FUI_PlantSeedItem))] |
||||
public static class FUI_PlantSeedItemSystem |
||||
{ |
||||
|
||||
public static void Awake(this FUI_PlantSeedItem self) |
||||
{ |
||||
var fui = self.GetParent<FUI>(); |
||||
if(fui.GObject == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
self.FGComp = (GButton)fui.GObject; |
||||
|
||||
self.FGComp.Add(fui); |
||||
|
||||
var com = fui.GObject.asCom; |
||||
|
||||
if(com != null) |
||||
{ |
||||
|
||||
self.m_button = com.GetControllerAt(0); |
||||
self.m_state = com.GetControllerAt(1); |
||||
self.m_n0 = (GGraph)com.GetChildAt(0); |
||||
self.m_n1 = (GGraph)com.GetChildAt(1); |
||||
self.m_n2 = (GGraph)com.GetChildAt(2); |
||||
self.m_Icon = (GLoader)com.GetChildAt(3); |
||||
self.m_Name = (GTextField)com.GetChildAt(4); |
||||
self.m_n5 = (GTextField)com.GetChildAt(5); |
||||
self.m_n6 = (GTextField)com.GetChildAt(6); |
||||
} |
||||
} |
||||
|
||||
public static void Destroy(this FUI_PlantSeedItem self) |
||||
{ |
||||
if(self.IsDisposed) |
||||
{ |
||||
return; |
||||
} |
||||
self.FGComp.Remove(); |
||||
self.FGComp = null; |
||||
|
||||
self.m_button = null; |
||||
self.m_state = null; |
||||
self.m_n0 = null; |
||||
self.m_n1 = null; |
||||
self.m_n2 = null; |
||||
self.m_Icon = null; |
||||
self.m_Name = null; |
||||
self.m_n5 = null; |
||||
self.m_n6 = null; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,79 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
using FairyGUI; |
||||
using System.Threading.Tasks; |
||||
|
||||
namespace ET |
||||
{ |
||||
namespace FUIBuilding |
||||
{ |
||||
public class FUI_SeedInfoPopupAwakeSystem : AwakeSystem<FUI_SeedInfoPopup> |
||||
{ |
||||
public override void Awake(FUI_SeedInfoPopup self) |
||||
{ |
||||
self.Awake(); |
||||
} |
||||
} |
||||
|
||||
public class FUI_SeedInfoPopupDestroySystem : DestroySystem<FUI_SeedInfoPopup> |
||||
{ |
||||
public override void Destroy(FUI_SeedInfoPopup self) |
||||
{ |
||||
self.Destroy(); |
||||
} |
||||
} |
||||
|
||||
[FriendClass(typeof(FUI))] |
||||
[FriendClass(typeof(FUI_SeedInfoPopup))] |
||||
public static class FUI_SeedInfoPopupSystem |
||||
{ |
||||
|
||||
public static void Awake(this FUI_SeedInfoPopup self) |
||||
{ |
||||
var fui = self.GetParent<FUI>(); |
||||
if(fui.GObject == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
self.FGComp = (GComponent)fui.GObject; |
||||
|
||||
self.FGComp.Add(fui); |
||||
|
||||
var com = fui.GObject.asCom; |
||||
|
||||
if(com != null) |
||||
{ |
||||
|
||||
self.m_n0 = (GGraph)com.GetChildAt(0); |
||||
self.m_n1 = (GGraph)com.GetChildAt(1); |
||||
self.m_Name = (GTextField)com.GetChildAt(2); |
||||
self.m_NeedNum = (GTextField)com.GetChildAt(3); |
||||
self.m_n4 = (GTextField)com.GetChildAt(4); |
||||
self.m_n5 = (GTextField)com.GetChildAt(5); |
||||
self.m_Season = (GTextField)com.GetChildAt(6); |
||||
self.m_GrowTime = (GTextField)com.GetChildAt(7); |
||||
} |
||||
} |
||||
|
||||
public static void Destroy(this FUI_SeedInfoPopup self) |
||||
{ |
||||
if(self.IsDisposed) |
||||
{ |
||||
return; |
||||
} |
||||
self.FGComp.Remove(); |
||||
self.FGComp = null; |
||||
|
||||
self.m_n0 = null; |
||||
self.m_n1 = null; |
||||
self.m_Name = null; |
||||
self.m_NeedNum = null; |
||||
self.m_n4 = null; |
||||
self.m_n5 = null; |
||||
self.m_Season = null; |
||||
self.m_GrowTime = null; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,25 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
namespace ET |
||||
{ |
||||
using FUIBuilding; |
||||
[FriendClass(typeof(FUI_GreenButton))] |
||||
[FriendClass(typeof(FUI_SeedInfoPopup))] |
||||
[FriendClass(typeof(FUI_IconButton))] |
||||
[FriendClass(typeof(FUI_GreenButton))] |
||||
[FriendClass(typeof(FUI_GreenButton))] |
||||
[FriendClass(typeof(FUI_GreenButton))] |
||||
[FriendClass(typeof(FUI_IconButton))] |
||||
[FriendClass(typeof(FUI_GreenButton))] |
||||
[FriendClass(typeof(FUI_GreenButton))] |
||||
|
||||
[FriendClass(typeof(FUIFarmlandWindowComponent))] |
||||
|
||||
[FriendClass(typeof(FUI_FarmlandWindow))] |
||||
|
||||
public static partial class FUIFarmlandWindowComponentSystem |
||||
{ |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,342 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
using System.Collections.Generic; |
||||
using ET.FUIResource; |
||||
using FairyGUI; |
||||
using UnityEngine; |
||||
|
||||
namespace ET |
||||
{ |
||||
using FUIBuilding; |
||||
|
||||
public class FUIFarmlandWindowComponentAwakeSystem : AwakeSystem<FUIFarmlandWindowComponent> |
||||
{ |
||||
public override void Awake(FUIFarmlandWindowComponent self) |
||||
{ |
||||
self.Awake(); |
||||
} |
||||
} |
||||
|
||||
[FriendClass(typeof(Unit))] |
||||
[FriendClass(typeof(Farmland))] |
||||
[FriendClass(typeof(People))] |
||||
public static partial class FUIFarmlandWindowComponentSystem |
||||
{ |
||||
public static void Awake(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
self.FUIFarmlandWindow = self.Parent.GetComponent<FUI_FarmlandWindow>(); |
||||
self.Window = new Window(); |
||||
self.Window.contentPane = self.FUIFarmlandWindow.FGComp; |
||||
UIObjectFactory.SetPackageItemExtension(FUIPackage.Building_PlantSeedItem, typeof(PlantSeedItem)); |
||||
|
||||
// events |
||||
self.FUIFarmlandWindow.m_PlantSeedList.onClickItem.Add(self.OnSeedItemClick); |
||||
self.FUIFarmlandWindow.m_ConfirmSeedButton.FGComp.AddClickListenerAsync(self.OnSeedConfirmButtonClick); |
||||
self.FUIFarmlandWindow.m_WFP_FarmerIconButton.FGComp.onClick.Add(self.OnAddPlantPeopleButtonClick); |
||||
self.FUIFarmlandWindow.m_AddPlantPeopleButton.FGComp.onClick.Add(self.OnAddPlantPeopleButtonClick); |
||||
self.FUIFarmlandWindow.m_GrowSpeedUpButton.FGComp.AddClickListenerAsync(self.OnGrowSpeedUpButtonClick); |
||||
self.FUIFarmlandWindow.m_Harvest_FarmerIconButton.FGComp.onClick.Add(self.OnHarvestButtonClick); |
||||
self.FUIFarmlandWindow.m_HarvestButton.FGComp.onClick.Add(self.OnHarvestButtonClick); |
||||
|
||||
self.FUIFarmlandWindow.m_RemoveButton.FGComp.onClick.Add(self.OnRemoveButtonClick); |
||||
self.FUIFarmlandWindow.m_CloseButton.FGComp.onClick.Add(self.OnCloseButtonClick); |
||||
} |
||||
|
||||
public static void ShowInfo(this FUIFarmlandWindowComponent self, Building building) |
||||
{ |
||||
self.Building = building; |
||||
self.Farmland = self.Building.GetChildByType<Farmland>(); |
||||
if (self.Farmland == null) |
||||
{ |
||||
Log.Error($"Building [{self.Building.Id}] doesn't have a Farmland"); |
||||
return; |
||||
} |
||||
|
||||
self.FUIFarmlandWindow.m_farmlandState.selectedIndex = self.Farmland.FarmlandState; |
||||
|
||||
switch (self.Farmland.FarmlandState) |
||||
{ |
||||
case FarmlandState.FARMLAND_STATE_FREE: |
||||
self.ShowSeedPanel(); |
||||
break; |
||||
case FarmlandState.FARMLAND_STATE_SEED: |
||||
self.ShowWaitForPlantPanel(); |
||||
break; |
||||
case FarmlandState.FARMLAND_STATE_GROW: |
||||
self.ShowGrowPanel(); |
||||
break; |
||||
case FarmlandState.FARMLAND_STATE_RIPE: |
||||
self.ShowHarvestPanel(); |
||||
break; |
||||
} |
||||
} |
||||
|
||||
public static void Refresh(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
self.ShowInfo(self.Building); |
||||
} |
||||
|
||||
// 当农田状态发生改变时,检查当前是否打开改变农田的界面,进行更新 |
||||
public static void CheckToRefresh(this FUIFarmlandWindowComponent self, Farmland farmland) |
||||
{ |
||||
if (self.Farmland == farmland) |
||||
{ |
||||
self.Refresh(); |
||||
} |
||||
} |
||||
|
||||
public static void ShowSeedPanel(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
|
||||
self.FUIFarmlandWindow.m_SeedInfoPopup.Visible = false; |
||||
var list = self.FUIFarmlandWindow.m_PlantSeedList; |
||||
|
||||
var cropConfigList = CropConfigCategory.Instance.GetList(); |
||||
|
||||
// 获取当前种子的数量 |
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(self.ZoneScene()); |
||||
var storeComp = unit.GetComponent<StoreComponent>(); |
||||
|
||||
list.RemoveChildrenToPool(); |
||||
for (int i = 0; i < cropConfigList.Count; i++) |
||||
{ |
||||
CropConfig cropConfig = cropConfigList[i]; |
||||
var item = (PlantSeedItem)list.AddItemFromPool(); |
||||
item.data = cropConfig; |
||||
item.Name.text = cropConfig.Name; |
||||
item.Icon.url = cropConfig.CropPic; |
||||
|
||||
var itemConfig = AllItemConfigCategory.Instance.Get(cropConfig.SeedNeed); |
||||
var curNum = storeComp.GetItemNum(itemConfig.Id); |
||||
|
||||
// TODO: 暂时去掉季节判断 |
||||
// if (!cropConfig.Season.Contains(unit.Season)) |
||||
// { |
||||
// item.SetSeedState(SeedState.NOT_AVAILABLE); |
||||
// } |
||||
// else |
||||
if (curNum < cropConfig.SeedNum) |
||||
{ |
||||
item.SetSeedState(SeedState.NOT_NOT_ENOUGH); |
||||
} |
||||
else |
||||
{ |
||||
item.SetSeedState(SeedState.OK); |
||||
} |
||||
|
||||
if (i == 0) |
||||
{ |
||||
list.selectedIndex = 0; |
||||
self.SelectSeedItem(item); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public static void ShowWaitForPlantPanel(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
var cropConfig = self.Farmland.Config; |
||||
if (cropConfig == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
self.FUIFarmlandWindow.m_WaitForPlant_CropIcon.url = cropConfig.CropPic; |
||||
|
||||
if (self.Farmland.PeopleId > 0) |
||||
{ |
||||
self.FUIFarmlandWindow.m_hasPeople.selectedIndex = 1; |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(self.ZoneScene()); |
||||
var peopleComp = unit.GetComponent<PeopleComponent>(); |
||||
var people = peopleComp.GetChild<People>(self.Farmland.PeopleId); |
||||
self.FUIFarmlandWindow.m_WFP_FarmerIconButton.m_Icon.url = PeopleViewHelper.GetHeadIconUrlByGender(people.GetGender()); |
||||
self.FUIFarmlandWindow.m_WFP_FarmerIconButton.m_Name.text = people.Name; |
||||
} |
||||
else |
||||
{ |
||||
self.FUIFarmlandWindow.m_hasPeople.selectedIndex = 0; |
||||
} |
||||
} |
||||
|
||||
public static void ShowGrowPanel(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
var cropConfig = self.Farmland.Config; |
||||
if (cropConfig == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
self.FUIFarmlandWindow.m_Grow_CropIcon.url = cropConfig.CropPic; |
||||
|
||||
int day = GameUtil.GetDaysOfTime(cropConfig.GrowthCycle); |
||||
self.FUIFarmlandWindow.m_GrowText.text = TextHelper.GetGrowUpTimeText(day); |
||||
self.FUIFarmlandWindow.m_Grow_ProductionNum.text = cropConfig.BasicProduction.ToString(); |
||||
} |
||||
|
||||
public static void ShowHarvestPanel(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
var cropConfig = self.Farmland.Config; |
||||
if (cropConfig == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
self.FUIFarmlandWindow.m_Harvest_CropIcon.url = cropConfig.CropPic; |
||||
|
||||
if (self.Farmland.PeopleId > 0) |
||||
{ |
||||
self.FUIFarmlandWindow.m_hasPeople.selectedIndex = 1; |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(self.ZoneScene()); |
||||
var peopleComp = unit.GetComponent<PeopleComponent>(); |
||||
var people = peopleComp.GetChild<People>(self.Farmland.PeopleId); |
||||
self.FUIFarmlandWindow.m_Harvest_FarmerIconButton.m_Icon.url = PeopleViewHelper.GetHeadIconUrlByGender(people.GetGender()); |
||||
self.FUIFarmlandWindow.m_Harvest_FarmerIconButton.m_Name.text = people.Name; |
||||
} |
||||
else |
||||
{ |
||||
self.FUIFarmlandWindow.m_hasPeople.selectedIndex = 0; |
||||
} |
||||
} |
||||
|
||||
public static void OnAddPlantPeopleButtonClick(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
self.SelectPlantPeople().Coroutine(); |
||||
} |
||||
|
||||
public static async ETTask SelectPlantPeople(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
var selectWorkerWin = FUIComponent.Instance.ShowWindow<FUI_SelectWorkerWindow, FUISelectWorkerWindowComponent>(); |
||||
var workers = await selectWorkerWin.ShowAsync(1); |
||||
if (workers.Count <= 0) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
var workerId = workers[0]; |
||||
if (workerId <= 0) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(self.ZoneScene()); |
||||
var peopleComp = unit.GetComponent<PeopleComponent>(); |
||||
var worker = peopleComp.GetChild<People>(workerId); |
||||
await FarmlandHelper.GoFarmlandPlant(unit, worker, self.Farmland); |
||||
self.Refresh(); |
||||
} |
||||
|
||||
public static void SelectSeedItem(this FUIFarmlandWindowComponent self, PlantSeedItem plantSeedItem) |
||||
{ |
||||
var cropConfig = (CropConfig) plantSeedItem.data; |
||||
self.CurSelectCrop = cropConfig; |
||||
|
||||
var itemConfig = AllItemConfigCategory.Instance.Get(cropConfig.SeedNeed); |
||||
|
||||
// 获取当前种子的数量 |
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(self.ZoneScene()); |
||||
var storeComp = unit.GetComponent<StoreComponent>(); |
||||
var curNum = storeComp.GetItemNum(itemConfig.Id); |
||||
|
||||
var popup = self.FUIFarmlandWindow.m_SeedInfoPopup; |
||||
popup.m_Name.text = cropConfig.Name; |
||||
|
||||
popup.m_NeedNum.text = $"{curNum}/{cropConfig.SeedNum}"; |
||||
string seasonStr = ""; |
||||
int[] seasonArray = cropConfig.Season; |
||||
for (int i = 0; i < seasonArray.Length; i++) |
||||
{ |
||||
seasonStr += TextHelper.GetSeasonText(seasonArray[i]); |
||||
if (seasonArray.Length > 1 && i < seasonArray.Length - 1) |
||||
{ |
||||
seasonStr += ","; |
||||
} |
||||
} |
||||
popup.m_Season.text = seasonStr; |
||||
popup.m_GrowTime.text = cropConfig.GrowthCycle.ToString(); |
||||
popup.Visible = true; |
||||
GRoot.inst.ShowPopup(popup.FGComp, plantSeedItem); |
||||
} |
||||
|
||||
public static void OnSeedItemClick(this FUIFarmlandWindowComponent self, EventContext context) |
||||
{ |
||||
var plantSeedItem = (PlantSeedItem) context.data; |
||||
self.SelectSeedItem(plantSeedItem); |
||||
} |
||||
|
||||
public static async ETTask OnSeedConfirmButtonClick(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
Farmland farmland = self.Building.GetChildByType<Farmland>(); |
||||
if (farmland == null) |
||||
{ |
||||
Log.Error($"Building [{self.Building.Id}] dosen't have a Farmland"); |
||||
return; |
||||
} |
||||
List<long> farmlandList = new List<long>(); |
||||
farmlandList.Add(farmland.Id); |
||||
List<int> cropList = new List<int>(); |
||||
cropList.Add(self.CurSelectCrop.Id); |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(self.ZoneScene()); |
||||
int result = await FarmlandHelper.FarmlandSeed(unit, farmlandList, cropList); |
||||
|
||||
if (result != ErrorCode.ERR_Success) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
self.SelectPlantPeople().Coroutine(); |
||||
} |
||||
|
||||
public static async ETTask OnGrowSpeedUpButtonClick(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(self.ZoneScene()); |
||||
int result = await FarmlandHelper.FarmlandRipe(unit, self.Farmland.Id); |
||||
} |
||||
|
||||
public static async ETTask SelectHarvestPeople(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
var selectWorkerWin = FUIComponent.Instance.ShowWindow<FUI_SelectWorkerWindow, FUISelectWorkerWindowComponent>(); |
||||
var workers = await selectWorkerWin.ShowAsync(1); |
||||
if (workers.Count <= 0) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
var workerId = workers[0]; |
||||
if (workerId <= 0) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(self.ZoneScene()); |
||||
var peopleComp = unit.GetComponent<PeopleComponent>(); |
||||
var worker = peopleComp.GetChild<People>(workerId); |
||||
await FarmlandHelper.GoFarmlandHarvest(unit, worker, self.Farmland); |
||||
self.Refresh(); |
||||
} |
||||
|
||||
public static void OnHarvestButtonClick(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
self.SelectHarvestPeople().Coroutine(); |
||||
} |
||||
|
||||
public static void OnRemoveButtonClick(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
if (self.Building == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(self.ZoneScene()); |
||||
BuildingHelper.RemoveBuilding(unit, self.Building).Coroutine(); |
||||
self.Window.Hide(); |
||||
} |
||||
|
||||
public static void OnCloseButtonClick(this FUIFarmlandWindowComponent self) |
||||
{ |
||||
self.Window.Hide(); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,21 @@
|
||||
using ET.EventType; |
||||
using ET.FUIBuilding; |
||||
|
||||
namespace ET |
||||
{ |
||||
public class FarmlandStateChanged_RefreshWindow : AEvent<FarmlandStateChanged> |
||||
{ |
||||
protected override void Run(FarmlandStateChanged args) |
||||
{ |
||||
var winEntity = FUIComponent.Instance.GetWindow(FUI_FarmlandWindow.UIResName) ; |
||||
if (winEntity != null) |
||||
{ |
||||
var farmlandWin = winEntity as FUIFarmlandWindowComponent; |
||||
if (farmlandWin.IsShowing) |
||||
{ |
||||
farmlandWin.CheckToRefresh(args.Farmland); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,18 @@
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[Behave(ConstBehaveType.BEHAVE_CONSTRUCT)] |
||||
public class Behave_Construct: BehaveBase |
||||
{ |
||||
public override void Handle(People people) |
||||
{ |
||||
var pAnimator = people.GetComponent<PeopleAnimatorComponent>(); |
||||
if (pAnimator == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
pAnimator.StopAll(); |
||||
pAnimator.PlayAnimation(PeopleAnimEnum.Construct); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,18 @@
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[Behave(ConstBehaveType.BEHAVE_GATHER)] |
||||
public class Behave_Gather : BehaveBase |
||||
{ |
||||
public override void Handle(People people) |
||||
{ |
||||
var pAnimator = people.GetComponent<PeopleAnimatorComponent>(); |
||||
if (pAnimator == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
pAnimator.StopAll(); |
||||
pAnimator.PlayAnimation(PeopleAnimEnum.Gather); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,34 @@
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[Behave(ConstBehaveType.BEHAVE_HARVEST)] |
||||
public class Behave_Harvest : BehaveBase |
||||
{ |
||||
public override void Handle(People people) |
||||
{ |
||||
PlayPlantAnim(people).Coroutine(); |
||||
} |
||||
|
||||
public async ETTask PlayPlantAnim(People people) |
||||
{ |
||||
var pAnimator = people.GetComponent<PeopleAnimatorComponent>(); |
||||
if (pAnimator == null) |
||||
{ |
||||
return; |
||||
} |
||||
pAnimator.StopAll(); |
||||
pAnimator.PlayAnimation(PeopleAnimEnum.Gather); |
||||
|
||||
await TimerComponent.Instance.WaitAsync(3000); |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene()); |
||||
var targetId = people.GetTargetId(); |
||||
var farmland = unit.GetGrandChild<Farmland>(targetId); |
||||
if (farmland == null) |
||||
{ |
||||
Log.Error($"Can't find farmland: ${targetId}"); |
||||
return; |
||||
} |
||||
FarmlandHelper.FarmlandHarvest(unit, farmland, people).Coroutine(); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,18 @@
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[Behave(ConstBehaveType.BEHAVE_IDLE)] |
||||
public class Behave_Idle : BehaveBase |
||||
{ |
||||
public override void Handle(People people) |
||||
{ |
||||
var pAnimator = people.GetComponent<PeopleAnimatorComponent>(); |
||||
if (pAnimator == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
pAnimator.StopAll(); |
||||
pAnimator.PlayAnimation(PeopleAnimEnum.Idle); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,34 @@
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[Behave(ConstBehaveType.BEHAVE_PLANT)] |
||||
public class Behave_Plant : BehaveBase |
||||
{ |
||||
public override void Handle(People people) |
||||
{ |
||||
PlayPlantAnim(people).Coroutine(); |
||||
} |
||||
|
||||
public async ETTask PlayPlantAnim(People people) |
||||
{ |
||||
var pAnimator = people.GetComponent<PeopleAnimatorComponent>(); |
||||
if (pAnimator == null) |
||||
{ |
||||
return; |
||||
} |
||||
pAnimator.StopAll(); |
||||
pAnimator.PlayAnimation(PeopleAnimEnum.Construct); |
||||
|
||||
await TimerComponent.Instance.WaitAsync(3000); |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene()); |
||||
var targetId = people.GetTargetId(); |
||||
var farmland = unit.GetGrandChild<Farmland>(targetId); |
||||
if (farmland == null) |
||||
{ |
||||
Log.Error($"Can't find farmland: ${targetId}"); |
||||
return; |
||||
} |
||||
FarmlandHelper.FinishFarmlandPlant(unit, farmland, people).Coroutine(); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,42 @@
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[Behave(ConstBehaveType.BEHAVE_PREPARE_CONSTRUCT)] |
||||
[FriendClass(typeof(Construct))] |
||||
public class Behave_Prepare_Construct : BehaveBase |
||||
{ |
||||
public override void Handle(People people) |
||||
{ |
||||
PeopleViewComponent pView = people.GetComponent<PeopleViewComponent>(); |
||||
if (pView == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene()); |
||||
|
||||
long targetId = people.GetTargetId(); |
||||
ConstructComponent cc = unit.GetComponent<ConstructComponent>(); |
||||
|
||||
if (cc != null) |
||||
{ |
||||
Construct c = cc.GetChild<Construct>(targetId); |
||||
if (c != null) |
||||
{ |
||||
if (c.PreparePeopleIdList.Contains(people.Id)) |
||||
{ |
||||
var cView = c.GetComponent<ConstructViewComponent>(); |
||||
pView.MoveToPos(cView.GetWorkerPos(people.Id)); |
||||
} |
||||
} |
||||
} |
||||
|
||||
var pAnimator = people.GetComponent<PeopleAnimatorComponent>(); |
||||
if (pAnimator == null) |
||||
{ |
||||
return; |
||||
} |
||||
pAnimator.StopAll(); |
||||
pAnimator.PlayAnimation(PeopleAnimEnum.Run); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,42 @@
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[Behave(ConstBehaveType.BEHAVE_PREPARE_GATHER)] |
||||
[FriendClass(typeof(Gather))] |
||||
[FriendClass(typeof(ResourcePoint))] |
||||
public class Behave_Prepare_Gather : BehaveBase |
||||
{ |
||||
public override void Handle(People people) |
||||
{ |
||||
PeopleViewComponent pView = people.GetComponent<PeopleViewComponent>(); |
||||
if (pView == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene()); |
||||
GatherComponent gc = unit.GetComponent<GatherComponent>(); |
||||
Gather gather = gc?.GetGatherByPeopleId(people.Id); |
||||
if (gather != null && gather.PreparePeopleIdList.Contains(people.Id)) |
||||
{ |
||||
ResourcePointComponent rc = unit.GetComponent<ResourcePointComponent>(); |
||||
var resource = rc.GetChild<ResourcePoint>(gather.ResPointId); |
||||
var resourceViewComp = resource.GetComponent<ResourceViewComponent>(); |
||||
if (resourceViewComp == null) |
||||
{ |
||||
Log.Error($"Can't find resourceViewComp of {resource.Id} : {resource.ConfigId}"); |
||||
} |
||||
|
||||
|
||||
pView.MoveToPos(resourceViewComp.GetWorkerPos()); |
||||
} |
||||
|
||||
var pAnimator = people.GetComponent<PeopleAnimatorComponent>(); |
||||
if (pAnimator == null) |
||||
{ |
||||
return; |
||||
} |
||||
pAnimator.StopAll(); |
||||
pAnimator.PlayAnimation(PeopleAnimEnum.Run); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,41 @@
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[Behave(ConstBehaveType.BEHAVE_PREPARE_HARVEST)] |
||||
public class Behave_Prepare_Harvest : BehaveBase |
||||
{ |
||||
public override void Handle(People people) |
||||
{ |
||||
PeopleViewComponent pView = people.GetComponent<PeopleViewComponent>(); |
||||
if (pView == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene()); |
||||
|
||||
// 为farmland |
||||
long targetId = people.GetTargetId(); |
||||
|
||||
var farmland = unit.GetGrandChild<Farmland>(targetId); |
||||
|
||||
if (farmland != null) |
||||
{ |
||||
Building building = farmland.GetParent<Building>(); |
||||
|
||||
if (building != null) |
||||
{ |
||||
var bView = building.GetComponent<BuildingViewComponent>(); |
||||
pView.MoveToPos(bView.GetWorkPos()); |
||||
} |
||||
} |
||||
|
||||
var pAnimator = people.GetComponent<PeopleAnimatorComponent>(); |
||||
if (pAnimator == null) |
||||
{ |
||||
return; |
||||
} |
||||
pAnimator.StopAll(); |
||||
pAnimator.PlayAnimation(PeopleAnimEnum.Run); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,42 @@
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[Behave(ConstBehaveType.BEHAVE_PREPARE_PLANT)] |
||||
[FriendClass(typeof(Unit))] |
||||
public class Behave_Prepare_Plant : BehaveBase |
||||
{ |
||||
public override void Handle(People people) |
||||
{ |
||||
PeopleViewComponent pView = people.GetComponent<PeopleViewComponent>(); |
||||
if (pView == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
Unit unit = UnitHelper.GetMyUnitFromZoneScene(people.ZoneScene()); |
||||
|
||||
// 为farmland |
||||
long targetId = people.GetTargetId(); |
||||
|
||||
var farmland = unit.GetGrandChild<Farmland>(targetId); |
||||
|
||||
if (farmland != null) |
||||
{ |
||||
Building building = farmland.GetParent<Building>(); |
||||
|
||||
if (building != null) |
||||
{ |
||||
var bView = building.GetComponent<BuildingViewComponent>(); |
||||
pView.MoveToPos(bView.GetWorkPos()); |
||||
} |
||||
} |
||||
|
||||
var pAnimator = people.GetComponent<PeopleAnimatorComponent>(); |
||||
if (pAnimator == null) |
||||
{ |
||||
return; |
||||
} |
||||
pAnimator.StopAll(); |
||||
pAnimator.PlayAnimation(PeopleAnimEnum.Run); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,55 @@
|
||||
using System; |
||||
using System.Linq; |
||||
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
public class PeopleBehaveComponentAwakeSystem: AwakeSystem<PeopleBehaveComponent> |
||||
{ |
||||
public override void Awake(PeopleBehaveComponent self) |
||||
{ |
||||
PeopleBehaveComponent.Instance = self; |
||||
self.Awake(); |
||||
} |
||||
} |
||||
|
||||
[FriendClass(typeof(PeopleBehaveComponent))] |
||||
public static class PeopleBehaveComponentSystem |
||||
{ |
||||
public static void Awake(this PeopleBehaveComponent self) |
||||
{ |
||||
var behaves = Game.EventSystem.GetTypes(typeof (BehaveAttribute)); |
||||
foreach (var type in behaves) |
||||
{ |
||||
object[] attrs = type.GetCustomAttributes(typeof (BehaveAttribute), false); |
||||
if (attrs.Length == 0) |
||||
{ |
||||
continue; |
||||
} |
||||
|
||||
BehaveAttribute behaveAttribute = attrs[0] as BehaveAttribute; |
||||
BehaveBase behave = Activator.CreateInstance(type) as BehaveBase; |
||||
self.AllBehaveDict.Add(behaveAttribute.BehaveID, behave); |
||||
} |
||||
} |
||||
|
||||
public static void HandlePeopleBehave(this PeopleBehaveComponent self, People people) |
||||
{ |
||||
int behaveId = people.GetBehaveType(); |
||||
if (!self.AllBehaveDict.ContainsKey(behaveId)) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
try |
||||
{ |
||||
|
||||
self.AllBehaveDict[behaveId].Handle(people); |
||||
} |
||||
catch (Exception e) |
||||
{ |
||||
Log.Error(e); |
||||
throw; |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,11 @@
|
||||
namespace ET |
||||
{ |
||||
public static class GameUtil |
||||
{ |
||||
// 传入真实时间,转化为游戏的天数 |
||||
public static int GetDaysOfTime(float time) |
||||
{ |
||||
return (int)time; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,67 @@
|
||||
namespace ET |
||||
{ |
||||
public static class TextHelper |
||||
{ |
||||
public static string GetSeasonText(int season) |
||||
{ |
||||
switch (season) |
||||
{ |
||||
case 1: |
||||
return "春"; |
||||
case 2: |
||||
return "夏"; |
||||
case 3: |
||||
return "秋"; |
||||
case 4: |
||||
return "冬"; |
||||
default: |
||||
return ""; |
||||
} |
||||
} |
||||
|
||||
public static string GetGrowUpTimeText(int day) |
||||
{ |
||||
return $"[color=#00FF00]{day}[/color]日后成熟"; |
||||
} |
||||
|
||||
public static string GetPeopleStateMsg(int behaveType) |
||||
{ |
||||
string msg = "未知"; |
||||
switch (behaveType) |
||||
{ |
||||
case ConstBehaveType.BEHAVE_IDLE: |
||||
msg = "空闲"; |
||||
break; |
||||
case ConstBehaveType.BEHAVE_PREPARE_GATHER: |
||||
msg = "去采集的路上"; |
||||
break; |
||||
case ConstBehaveType.BEHAVE_GATHER: |
||||
msg = "正在采集"; |
||||
break; |
||||
case ConstBehaveType.BEHAVE_PREPARE_CONSTRUCT: |
||||
msg = "在去建造的路上"; |
||||
break; |
||||
case ConstBehaveType.BEHAVE_CONSTRUCT: |
||||
msg = "正在建造"; |
||||
break; |
||||
case ConstBehaveType.BEHAVE_PREPARE_PLANT: |
||||
msg = "去种植的路上"; |
||||
break; |
||||
case ConstBehaveType.BEHAVE_PLANT: |
||||
msg = "种植中"; |
||||
break; |
||||
case ConstBehaveType.BEHAVE_PREPARE_HARVEST: |
||||
msg = "去收获的路上"; |
||||
break; |
||||
case ConstBehaveType.BEHAVE_HARVEST: |
||||
msg = "收获中"; |
||||
break; |
||||
default: |
||||
Log.Error($"Unknown behaviour type:{behaveType}"); |
||||
break; |
||||
} |
||||
|
||||
return msg; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,85 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
using FairyGUI; |
||||
|
||||
namespace ET |
||||
{ |
||||
namespace FUIBuilding |
||||
{ |
||||
[ComponentOf(typeof(FUI))] |
||||
public sealed class FUI_FarmlandWindow : Entity, IAwake, IDestroy |
||||
{ |
||||
public static string UIPackageName = "Building"; |
||||
public static string UIResName = "FarmlandWindow"; |
||||
|
||||
/// <summary> |
||||
/// {uiResName}的组件类型(GComponent、GButton、GProcessBar等),它们都是GObject的子类。 |
||||
/// </summary> |
||||
public GComponent FGComp; |
||||
|
||||
public Controller m_farmlandState; |
||||
public Controller m_hasPeople; |
||||
public GGraph m_n1; |
||||
public GList m_PlantSeedList; |
||||
public FUI_GreenButton m_ConfirmSeedButton; |
||||
public GGraph m_n3; |
||||
public FUI_SeedInfoPopup m_SeedInfoPopup; |
||||
public GGroup m_SeedPanel; |
||||
public GGraph m_n8; |
||||
public GGraph m_n10; |
||||
public GLoader m_WaitForPlant_CropIcon; |
||||
public GTextField m_n12; |
||||
public GTextField m_WaitForPlantText; |
||||
public GTextField m_n14; |
||||
public GTextField m_n15; |
||||
public FUI_IconButton m_WFP_FarmerIconButton; |
||||
public FUI_GreenButton m_AddPlantPeopleButton; |
||||
public GGroup m_WaitForPlantPanel; |
||||
public GGraph m_n18; |
||||
public GGraph m_n19; |
||||
public GLoader m_Grow_CropIcon; |
||||
public GTextField m_n21; |
||||
public GTextField m_GrowText; |
||||
public GTextField m_n23; |
||||
public GTextField m_Grow_ProductionNum; |
||||
public FUI_GreenButton m_GrowSpeedUpButton; |
||||
public GGroup m_GrowPanel; |
||||
public GGraph m_n27; |
||||
public GGraph m_n28; |
||||
public GLoader m_Harvest_CropIcon; |
||||
public GTextField m_n30; |
||||
public GTextField m_HarvestText; |
||||
public GTextField m_n32; |
||||
public GTextField m_Harvest_ProductionNum; |
||||
public FUI_GreenButton m_HarvestButton; |
||||
public FUI_IconButton m_Harvest_FarmerIconButton; |
||||
public GGroup m_HarvestPanel; |
||||
public FUI_GreenButton m_RemoveButton; |
||||
public FUI_GreenButton m_CloseButton; |
||||
public const string URL = "ui://2126z1eanrkau"; |
||||
|
||||
|
||||
public bool Visible |
||||
{ |
||||
get |
||||
{ |
||||
if (FGComp == null) |
||||
{ |
||||
return false; |
||||
} |
||||
|
||||
return FGComp.visible; |
||||
} |
||||
set |
||||
{ |
||||
if (FGComp == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
FGComp.visible = value; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,48 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
using FairyGUI; |
||||
|
||||
namespace ET |
||||
{ |
||||
namespace FUIBuilding |
||||
{ |
||||
[ComponentOf(typeof(FUI))] |
||||
public sealed class FUI_IconButton : Entity, IAwake, IDestroy |
||||
{ |
||||
public static string UIPackageName = "Building"; |
||||
public static string UIResName = "IconButton"; |
||||
|
||||
/// <summary> |
||||
/// {uiResName}的组件类型(GComponent、GButton、GProcessBar等),它们都是GObject的子类。 |
||||
/// </summary> |
||||
public GButton FGComp; |
||||
|
||||
public GLoader m_Icon; |
||||
public GTextField m_Name; |
||||
public const string URL = "ui://2126z1eaifd4x"; |
||||
|
||||
|
||||
public bool Visible |
||||
{ |
||||
get |
||||
{ |
||||
if (FGComp == null) |
||||
{ |
||||
return false; |
||||
} |
||||
|
||||
return FGComp.visible; |
||||
} |
||||
set |
||||
{ |
||||
if (FGComp == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
FGComp.visible = value; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,55 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
using FairyGUI; |
||||
|
||||
namespace ET |
||||
{ |
||||
namespace FUIBuilding |
||||
{ |
||||
[ComponentOf(typeof(FUI))] |
||||
public sealed class FUI_PlantSeedItem : Entity, IAwake, IDestroy |
||||
{ |
||||
public static string UIPackageName = "Building"; |
||||
public static string UIResName = "PlantSeedItem"; |
||||
|
||||
/// <summary> |
||||
/// {uiResName}的组件类型(GComponent、GButton、GProcessBar等),它们都是GObject的子类。 |
||||
/// </summary> |
||||
public GButton FGComp; |
||||
|
||||
public Controller m_button; |
||||
public Controller m_state; |
||||
public GGraph m_n0; |
||||
public GGraph m_n1; |
||||
public GGraph m_n2; |
||||
public GLoader m_Icon; |
||||
public GTextField m_Name; |
||||
public GTextField m_n5; |
||||
public GTextField m_n6; |
||||
public const string URL = "ui://2126z1eanrkav"; |
||||
|
||||
|
||||
public bool Visible |
||||
{ |
||||
get |
||||
{ |
||||
if (FGComp == null) |
||||
{ |
||||
return false; |
||||
} |
||||
|
||||
return FGComp.visible; |
||||
} |
||||
set |
||||
{ |
||||
if (FGComp == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
FGComp.visible = value; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,54 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
using FairyGUI; |
||||
|
||||
namespace ET |
||||
{ |
||||
namespace FUIBuilding |
||||
{ |
||||
[ComponentOf(typeof(FUI))] |
||||
public sealed class FUI_SeedInfoPopup : Entity, IAwake, IDestroy |
||||
{ |
||||
public static string UIPackageName = "Building"; |
||||
public static string UIResName = "SeedInfoPopup"; |
||||
|
||||
/// <summary> |
||||
/// {uiResName}的组件类型(GComponent、GButton、GProcessBar等),它们都是GObject的子类。 |
||||
/// </summary> |
||||
public GComponent FGComp; |
||||
|
||||
public GGraph m_n0; |
||||
public GGraph m_n1; |
||||
public GTextField m_Name; |
||||
public GTextField m_NeedNum; |
||||
public GTextField m_n4; |
||||
public GTextField m_n5; |
||||
public GTextField m_Season; |
||||
public GTextField m_GrowTime; |
||||
public const string URL = "ui://2126z1eanrkaw"; |
||||
|
||||
|
||||
public bool Visible |
||||
{ |
||||
get |
||||
{ |
||||
if (FGComp == null) |
||||
{ |
||||
return false; |
||||
} |
||||
|
||||
return FGComp.visible; |
||||
} |
||||
set |
||||
{ |
||||
if (FGComp == null) |
||||
{ |
||||
return; |
||||
} |
||||
|
||||
FGComp.visible = value; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,39 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
using FairyGUI; |
||||
using FairyGUI.Utils; |
||||
|
||||
namespace ET |
||||
{ |
||||
namespace FUIBuilding |
||||
{ |
||||
public partial class PlantSeedItem : GButton |
||||
{ |
||||
public Controller button; |
||||
public Controller state; |
||||
public GGraph n0; |
||||
public GGraph n1; |
||||
public GGraph n2; |
||||
public GLoader Icon; |
||||
public GTextField Name; |
||||
public GTextField n5; |
||||
public GTextField n6; |
||||
public const string URL = "ui://2126z1eanrkav"; |
||||
|
||||
public override void ConstructFromXML(XML xml) |
||||
{ |
||||
base.ConstructFromXML(xml); |
||||
|
||||
button = GetControllerAt(0); |
||||
state = GetControllerAt(1); |
||||
n0 = (GGraph)GetChildAt(0); |
||||
n1 = (GGraph)GetChildAt(1); |
||||
n2 = (GGraph)GetChildAt(2); |
||||
Icon = (GLoader)GetChildAt(3); |
||||
Name = (GTextField)GetChildAt(4); |
||||
n5 = (GTextField)GetChildAt(5); |
||||
n6 = (GTextField)GetChildAt(6); |
||||
} |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,26 @@
|
||||
/** This is an automatically generated class by FairyGUI. Please do not modify it. **/ |
||||
|
||||
namespace ET |
||||
{ |
||||
using FUIBuilding; |
||||
using FairyGUI; |
||||
|
||||
public class FUIFarmlandWindowComponent : Entity, IAwake, IDestroy, IFUIWindow |
||||
{ |
||||
public Window Window { get; set; } |
||||
public FUI_FarmlandWindow FUIFarmlandWindow; |
||||
|
||||
public Building Building; |
||||
public Farmland Farmland; |
||||
public CropConfig CurSelectCrop; |
||||
|
||||
public bool IsShowing |
||||
{ |
||||
get |
||||
{ |
||||
return this.Window.isShowing; |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,37 @@
|
||||
using UnityEditor.UI; |
||||
using UnityEngine; |
||||
|
||||
namespace ET |
||||
{ |
||||
namespace FUIBuilding |
||||
{ |
||||
public enum SeedState |
||||
{ |
||||
OK, // 满足所有条件 |
||||
NOT_AVAILABLE, // 不可 |
||||
NOT_NOT_ENOUGH, // 不足 |
||||
} |
||||
public partial class PlantSeedItem |
||||
{ |
||||
public void SetSeedState(SeedState seedState) |
||||
{ |
||||
switch (seedState) |
||||
{ |
||||
case SeedState.OK: |
||||
this.state.selectedIndex = 0; |
||||
this.Icon.color = Color.white; |
||||
break; |
||||
case SeedState.NOT_AVAILABLE: |
||||
this.state.selectedIndex = 1; |
||||
this.Icon.color = Color.gray;; |
||||
break; |
||||
case SeedState.NOT_NOT_ENOUGH: |
||||
this.state.selectedIndex = 2; |
||||
this.Icon.color = Color.gray;; |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,18 @@
|
||||
using System; |
||||
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[AttributeUsage(AttributeTargets.Class)] |
||||
public class BehaveAttribute: BaseAttribute |
||||
{ |
||||
public int BehaveID |
||||
{ |
||||
get; |
||||
} |
||||
|
||||
public BehaveAttribute(int id) |
||||
{ |
||||
this.BehaveID = id; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,7 @@
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
public abstract class BehaveBase |
||||
{ |
||||
public abstract void Handle(People people); |
||||
} |
||||
} |
@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic; |
||||
|
||||
namespace ET.PeopleBehave |
||||
{ |
||||
[ComponentOf(typeof(Scene))] |
||||
public class PeopleBehaveComponent: Entity, IAwake |
||||
{ |
||||
public static PeopleBehaveComponent Instance { get; set; } |
||||
public Dictionary<int, BehaveBase> AllBehaveDict = new (); |
||||
} |
||||
} |
Loading…
Reference in new issue