diff --git a/Assets/GWConquest/Prefabs/Battle.prefab b/Assets/GWConquest/Prefabs/Battle.prefab new file mode 100644 index 0000000..1cbfa2d --- /dev/null +++ b/Assets/GWConquest/Prefabs/Battle.prefab @@ -0,0 +1,75 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!1 &2057280478138210166 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 2057280478138210155} + - component: {fileID: 2057280478138210152} + - component: {fileID: 2057280478138210153} + m_Layer: 0 + m_Name: Battle + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!4 &2057280478138210155 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2057280478138210166} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 872.81177, y: -2957.7178, z: 666.5928} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 0 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} +--- !u!114 &2057280478138210152 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2057280478138210166} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: -36112512, guid: 5b00bf8b25851d440940a40ec23344f4, type: 3} + m_Name: + m_EditorClassIdentifier: + _sceneGuid: + _serializerGuid: 4b486c12-bb55-4fb6-88f3-1a16218c67cf + _prefabId: 1 + _updateRate: 1 + _autoFreezeProxyFrames: 0 + _clientPredicted: 1 + _allowInstantiateOnClient: 1 + _persistThroughSceneLoads: 0 + _sceneObjectDestroyOnDetach: 1 + _sceneObjectAutoAttach: 1 + _alwaysProxy: 0 + _detachOnDisable: 1 + _allowFirstReplicationWhenFrozen: 0 + _autoRemoveChildEntities: 0 + _entityBehaviourQueryOption: 0 + _entityPriorityCalculatorQueryOption: 0 + _entityReplicationFilterQueryOption: 0 +--- !u!114 &2057280478138210153 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 2057280478138210166} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 702759caf9c0c0142bf15cb9cb079f0b, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/Assets/GWConquest/Prefabs/Battle.prefab.meta b/Assets/GWConquest/Prefabs/Battle.prefab.meta new file mode 100644 index 0000000..22e7c37 --- /dev/null +++ b/Assets/GWConquest/Prefabs/Battle.prefab.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 12e1714c02c111f4e9d6981ad8f8036b +PrefabImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GWConquest/Prefabs/Factory.prefab b/Assets/GWConquest/Prefabs/Factory.prefab index 4a242dd..ca5c93c 100644 --- a/Assets/GWConquest/Prefabs/Factory.prefab +++ b/Assets/GWConquest/Prefabs/Factory.prefab @@ -95,7 +95,7 @@ MonoBehaviour: m_EditorClassIdentifier: _sceneGuid: _serializerGuid: 5b40b0d7-d27b-4407-968a-c0f4c722eb67 - _prefabId: 1 + _prefabId: 2 _updateRate: 1 _autoFreezeProxyFrames: 0 _clientPredicted: 1 diff --git a/Assets/GWConquest/Prefabs/Formation.prefab b/Assets/GWConquest/Prefabs/Formation.prefab index d942e35..58f6ad7 100644 --- a/Assets/GWConquest/Prefabs/Formation.prefab +++ b/Assets/GWConquest/Prefabs/Formation.prefab @@ -155,8 +155,6 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: b73507cdd59062e45a1e790e6f8d8fe8, type: 3} m_Name: m_EditorClassIdentifier: - unitIconPrefab: {fileID: 3490316418910827002, guid: 823be9508eb6c31478f39dff23361625, - type: 3} fleetIcon: {fileID: 3797021628422937969} movingArmyPrefab: {fileID: 7920185636364354306, guid: 233d61789cbb0504cb4f2605549a5fd2, type: 3} @@ -175,7 +173,7 @@ MonoBehaviour: m_EditorClassIdentifier: _sceneGuid: _serializerGuid: d7ecbbfb-2aa4-41e6-b745-72f55b565b31 - _prefabId: 2 + _prefabId: 3 _updateRate: 1 _autoFreezeProxyFrames: 0 _clientPredicted: 1 diff --git a/Assets/GWConquest/Prefabs/Player.prefab b/Assets/GWConquest/Prefabs/Player.prefab index 1ade3e4..7196c59 100644 --- a/Assets/GWConquest/Prefabs/Player.prefab +++ b/Assets/GWConquest/Prefabs/Player.prefab @@ -46,7 +46,7 @@ MonoBehaviour: m_EditorClassIdentifier: _sceneGuid: _serializerGuid: 59871d26-b925-463a-99f3-d6305974e7c3 - _prefabId: 3 + _prefabId: 4 _updateRate: 1 _autoFreezeProxyFrames: 0 _clientPredicted: 1 diff --git a/Assets/GWConquest/Prefabs/Unit.prefab b/Assets/GWConquest/Prefabs/Unit.prefab index 9de399d..6e72290 100644 --- a/Assets/GWConquest/Prefabs/Unit.prefab +++ b/Assets/GWConquest/Prefabs/Unit.prefab @@ -58,7 +58,7 @@ MonoBehaviour: m_EditorClassIdentifier: _sceneGuid: _serializerGuid: a3b5f966-83ae-4493-ac8f-90de2095ea63 - _prefabId: 4 + _prefabId: 5 _updateRate: 1 _autoFreezeProxyFrames: 0 _clientPredicted: 1 diff --git a/Assets/GWConquest/Resources/Database/Ships.csv b/Assets/GWConquest/Resources/Database/Ships.csv index 5620469..53adf3e 100644 --- a/Assets/GWConquest/Resources/Database/Ships.csv +++ b/Assets/GWConquest/Resources/Database/Ships.csv @@ -1,23 +1,28 @@ -Full Name,Short Name,Hitpoints,Attack Count,Damage,Penetration,Accuracy,Attack Timer,Armour,Evasion,Movement,Credit Cost,Recruit Cost,Ammo Cost,Fuel Cost,Build Time,Credit Upkeep,Food Upkeep,Min Factory Tier,Description -,,,,,,in %,in sec,,in %,,,,,,in sec,pro sec,pro sec,, -Strike Craft,StrikeCraft,10,1,10,1,90,5,2,50,2,200,10,10,10,10,2,2,1,Basic strike craft -Frigate,Frigate,10,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,200,10,10,10,10,2,2,3,Basic strike craft -Cruiser,Cruiser,10,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,200,10,10,10,10,2,2,3,Basic strike craft -Destroyer,Destroyer,10,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,200,10,10,10,10,2,2,3,Basic strike craft -Battleship,Battleship,10,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,200,10,10,10,10,2,2,1,Basic strike craft -Dreadnought,Dreadnought,10,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,200,10,10,10,10,2,2,1,Basic strike craft -Escort Carrier,EscortCarrier,10,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,200,10,10,10,10,2,2,1,Basic strike craft -Transport Frigate,TransportFrigate,10,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,200,10,10,10,10,2,2,2,Basic strike craft -Transport Cruiser,TransportCruiser,10,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,200,10,10,10,10,2,2,3,Basic strike craft -,,,,,,,,,,,,,,,,,,, -Ship Names:,,,,,,,,,,,,,,,,,,, -Dreaded Mauler,,,,,,,,,,,,,,,,,,, -Cursed Prince,,,,,,,,,,,,,,,,,,, -Avenging Son,,,,,,,,,,,,,,,,,,, -Unremembered Empire,,,,,,,,,,,,,,,,,,, -Ravager,,,,,,,,,,,,,,,,,,, -Silent Night,,,,,,,,,,,,,,,,,,, -Harrowing Hate,,,,,,,,,,,,,,,,,,, -Salvation in Death,,,,,,,,,,,,,,,,,,, -Edgelords of Sasel,,,,,,,,,,,,,,,,,,, -Boomers just wanna Grill,,,,,,,,,,,,,,,,,,, \ No newline at end of file +Full Name,Short Name,Hitpoints,Shields,Shield Regenerate,Attack Count,Damage,Penetration,Accuracy,Attack Timer,Armour,Evasion,Movement,Size,Credit Cost,Recruit Cost,Ammo Cost,Fuel Cost,Build Time,Credit Upkeep,Food Upkeep,Min Factory Tier,Description +,,,,,,,,in %,in sec,,in %,,,,,,,in sec,pro sec,pro sec,, +Strike Craft,StrikeCraft,10,10,3,1,10,1,90,5,2,50,2,3,200,10,10,10,10,2,2,1,Basic strike craft +Frigate,Frigate,10,10,3,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,20,200,10,10,10,10,2,2,3,Basic strike craft +Cruiser,Cruiser,10,10,3,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,20,200,10,10,10,10,2,2,3,Basic strike craft +Destroyer,Destroyer,10,10,3,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,20,200,10,10,10,10,2,2,3,Basic strike craft +Battleship,Battleship,10,10,3,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,20,200,10,10,10,10,2,2,1,Basic strike craft +Dreadnought,Dreadnought,10,10,3,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,20,200,10,10,10,10,2,2,1,Basic strike craft +Escort Carrier,EscortCarrier,10,10,3,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,20,200,10,10,10,10,2,2,1,Basic strike craft +Transport Frigate,TransportFrigate,10,10,3,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,20,200,10,10,10,10,2,2,2,Basic strike craft +Transport Cruiser,TransportCruiser,10,10,3,1/2/3,10/20/30,1/1/1,95/80/50,1/2/1,2,50,2,20,200,10,10,10,10,2,2,3,Basic strike craft +,,,,,,,,,,,,,,,,,,,,,, +Ship Names:,,,,,,,,,,,,,,,,,,,,,, +Dreaded Mauler,,,,,,,,,,,,,,,,,,,,,, +Cursed Prince,,,,,,,,,,,,,,,,,,,,,, +Avenging Son,,,,,,,,,,,,,,,,,,,,,, +Unremembered Empire,,,,,,,,,,,,,,,,,,,,,, +Ravager,,,,,,,,,,,,,,,,,,,,,, +Silent Night,,,,,,,,,,,,,,,,,,,,,, +Harrowing Hate,,,,,,,,,,,,,,,,,,,,,, +Salvation in Death,,,,,,,,,,,,,,,,,,,,,, +Edgelords of Sasel,,,,,,,,,,,,,,,,,,,,,, +Boomers just wanna Grill,,,,,,,,,,,,,,,,,,,,,, +Serpents Tail,,,,,,,,,,,,,,,,,,,,,, +Sunspear,,,,,,,,,,,,,,,,,,,,,, +Invincible Hand,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,, +Enteraktionen! sind A,,,,,,,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/Assets/GWConquest/Resources/Database/Units.csv b/Assets/GWConquest/Resources/Database/Units.csv index c1d6dd1..dc89356 100644 --- a/Assets/GWConquest/Resources/Database/Units.csv +++ b/Assets/GWConquest/Resources/Database/Units.csv @@ -1,105 +1,112 @@ -Full Name,Short Name,Factory Type,Hitpoints,Attack Count,Damage,Penetration,Accuracy,Attack Timer,Armour,Evasion,Movement,Morale,Defence Bonus,Credit Cost,Recruit Cost,Ammo Cost,Fuel Cost,Build Time,Credit Upkeep,Food Upkeep,Description -Militia,Militia,City,,,,,,,,,,,,100,5,0,,1,,,"Ordinary citizens defending their homeland, armed with everything that could be scrounged from storage. They are only rudimentarily trained and will not pose a real threat to any sizable force." -Conscripts,Conscripts,City,,,,,,,,,,,,300,5,2,,30,,,"These soldiers were pressed into service by the military authorities and armed only with subpar equipment. Consequently, their morale is quite low and they should not be expected to fight very hard." -Light Infantry,LightInfantry,Infantry,,,,,,,,,,,,,,,,,,, -Standard Infantry,StandardInfantry,Infantry,,,,,,,,,,,,,,,,,,, -Heavy Infantry,HeavyInfantry,Infantry,,,,,,,,,,,,,,,,,,, -Motorized Infantry,MotorizedInfantry,Infantry,,,,,,,,,,,,,,,,,,, -Mechanized Infantry,MechanizedInfantry,Infantry,,,,,,,,,,,,,,,,,,, -Pioneer Squad,Pioneer,Infantry,,,,,,,,,,,,,,,,,,, -Scout Vehicle,ScoutVehicle,Armour,,,,,,,,,,,,,,,,,,, -Light Tank,LightTank,Armour,,,,,,,,,,,,,,,,,,, -Medium Tank,MediumTank,Armour,,,,,,,,,,,,,,,,,,, -Heavy Tank,HeavyTank,Armour,,,,,,,,,,,,,,,,,,, -Super Heavy Tank,SuperHeavyTank,Armour,,,,,,,,,,,,,,,,,,, -Tankhunter,Tankhunter,Armour,,,,,,,,,,,,,,,,,,, -Light Anti Tank Gun,LightAntiTankGun,Armour,,,,,,,,,,,,,,,,,,, -Support Vehicle,SupportVehicle,Armour,,,,,,,,,,,,,,,,,,, -Transport Vehicle,TransportVehicle,Armour,,,,,,,,,,,,,,,,,,, -Flak Cannon,FlakCannon,Armour,,,,,,,,,,,,,,,,,,, -Flak Vehicle,FlakVehicle,Armour,,,,,,,,,,,,,,,,,,, -Flak Truck,FlakTruck,Armour,,,,,,,,,,,,,,,,,,, -Light Artillery Gun,LightArtilleryGun,Armour,,,,,,,,,,,,,,,,,,, -Artillery Gun,Artillery Gun,Armour,,,,,,,,,,,,,,,,,,, -Heavy Artillery Gun,Heavy Artillery Gun,Armour,,,,,,,,,,,,,,,,,,, -Super Heavy Artillery Gun,Super Heavy Artillery Gun,Armour,,,,,,,,,,,,,,,,,,, -Mountain Brigade,Mountain Brigade,Infantry,,,,,,,,,,,,,,,,,,, -Heavy Mountain Brigade,Heavy Mountain Brigade,Infantry,,,,,,,,,,,,,,,,,,, -Rocket Artillery,Rocket Artillery,Armour,,,,,,,,,,,,,,,,,,, -Heavy Rocket Artillery,Heavy Rocket Artillery,Armour,,,,,,,,,,,,,,,,,,, -Commando Unit,Commando Unit,Infantry,,,,,,,,,,,,,,,,,,, -Sniper Squad,Sniper Squad,Infantry,,,,,,,,,,,,,,,,,,, -Demolition Squad,Demolition Squad,Infantry,,,,,,,,,,,,,,,,,,, -Tank Hunter Squad,Tank Hunter Squad,Infantry,,,,,,,,,,,,,,,,,,, -Artillery Tank,Artillery Tank,Armour,,,,,,,,,,,,,,,,,,, -Breacher Squad,Breacher Squad,Infantry,,,,,,,,,,,,,,,,,,, -Marine Squad,Marine Squad,Infantry,,,,,,,,,,,,,,,,,,, -Grav-Chute Squad,Grav-Chute Squad,Infantry,,,,,,,,,,,,,,,,,,, -Heavy Anti Tank Gun,Heavy Anti Tank Gun,Armour,,,,,,,,,,,,,,,,,,, -Anti Tank Gun,Anti Tank Gun,Armour,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Rokurant,,,,,,,,,,,,,,,,,,,,, -Heavy Artillery Tank,,,,,,,,,,,,,,,,,,,,, -Siegebreaker Tank,,,,,,,,,,,,,,,,,,,,, -Bulk Transporter,,,,,,,,,,,,,,,,,,,,, -Heavy Transport Vehicle,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Voteine,,,,,,,,,,,,,,,,,,,,, -Fast Assault Tank,,,,,,,,,,,,,,,,,,,,, -Hover Tank,,,,,,,,,,,,,,,,,,,,, -Light Hover Tank,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Whythler,,,,,,,,,,,,,,,,,,,,, -Jet-Bike Squads,,,,,,,,,,,,,,,,,,,,, -Hover Tank,,,,,,,,,,,,,,,,,,,,, -Wythler Squad,,,,,,,,,,,,,,,,,,,,, -Power Armour Squad,,,,,,,,,,,,,,,,,,,,, -Rabble,,,,,,,,,,,,,,,,,,,,, -Wyth Palace Guard,,,,,,,,,,,,,,,,,,,,, -Assassins,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Elysia,,,,,,,,,,,,,,,,,,,,, -Light Commando Vehicle,,,,,,,,,,,,,,,,,,,,, -Elysian Knight Squad,,,,,,,,,,,,,,,,,,,,, -Elysian Mechs,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Yar-Kassy,,,,,,,,,,,,,,,,,,,,, -Dervish Assault Squad,,,,,,,,,,,,,,,,,,,,, -Desert Raider Squad,,,,,,,,,,,,,,,,,,,,, -Elite Marksmen Squad,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Arca,,,,,,,,,,,,,,,,,,,,, -Scum,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Zami,,,,,,,,,,,,,,,,,,,,, -Cryo-Clone Squad,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Stunteen,,,,,,,,,,,,,,,,,,,,, -Headtaker Commando,,,,,,,,,,,,,,,,,,,,, -Hareen Cari Immortals,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Exan,,,,,,,,,,,,,,,,,,,,, -Clan Warriors,,,,,,,,,,,,,,,,,,,,, -Headtakers,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Methaphor,,,,,,,,,,,,,,,,,,,,, -Republican Guard,,,,,,,,,,,,,,,,,,,,, -Green Guard (Elite Mountain Troops),,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Noser,,,,,,,,,,,,,,,,,,,,, -Royal Guard,,,,,,,,,,,,,,,,,,,,, -Stalker Squad,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Squad Upgrades:,,,,,,,,,,,,,,,,,,,,, -Anti Tank Set,,,,,,,,,,,,,,,,,,,,, -"Camoflage Set (Jungle, Desert, Standard Camo)",,,,,,,,,,,,,,,,,,,,, -Anti Tank Rifles,,,,,,,,,,,,,,,,,,,,, -Machine Gun,,,,,,,,,,,,,,,,,,,,, -Multilaser,,,,,,,,,,,,,,,,,,,,, -Flyer Fist,,,,,,,,,,,,,,,,,,,,, -Explosives,,,,,,,,,,,,,,,,,,,,, -,,,,,,,,,,,,,,,,,,,,, -Tank Upgrades:,,,,,,,,,,,,,,,,,,,,, -Command and Controll Module,,,,,,,,,,,,,,,,,,,,, -Tank Camo,,,,,,,,,,,,,,,,,,,,, -"Tracks (Jungle, Desert)",,,,,,,,,,,,,,,,,,,,, \ No newline at end of file +Full Name,Short Name,Factory Type,Hitpoints,Attack Count,Damage,Penetration,Accuracy,Armour,Shields,Shield Regenerate,Evasion,Movement,Size,Morale,Defence Bonus,Abilities,Credit Cost,Recruit Cost,Ammo Cost,Fuel Cost,Build Time,Credit Upkeep,Food Upkeep,Description +Militia,Militia,City,10,1,,,,0,0,,,,,,,,100,5,0,,20,,,"Ordinary citizens defending their homeland, armed with everything that could be scrounged from storage. They are only rudimentarily trained and will not pose a real threat to any sizable force." +Conscripts,Conscripts,City,10,1,,,,0,0,,,,,,,,300,5,2,,30,,,"These soldiers were pressed into service by the military authorities and armed only with subpar equipment. Consequently, their morale is quite low and they should not be expected to fight very hard." +Light Infantry,LightInfantry,Infantry,15,1,,,,0,0,,,,,,,,,,,,,,, +Standard Infantry,StandardInfantry,Infantry,20,1,,,,0.3,0,,,,,,,,,,,,,,, +Heavy Infantry,HeavyInfantry,Infantry,35,2,,,,0.5,0,,,,,,,,,,,,,,, +Motorized Infantry,MotorizedInfantry,Infantry,30,2,,,,1,0,,,,,,,,,,,,,,, +Mechanized Infantry,MechanizedInfantry,Infantry,30,2,,,,1,0,,,,,,,,,,,,,,, +Pioneer Squad,Pioneer,Infantry,,,,,,0.5,0,,,,,,,,,,,,,,, +Scout Vehicle,ScoutVehicle,Armour,40,,,1,0.7,1,0,,1,4,,,,,,,,,,,, +Light Tank,LightTank,Armour,60,3/5,5/4,2/1,0.6/0.6,2,0,,,3,45,,,,1000,,,,1,,, +Medium Tank,MediumTank,Armour,100,2/5,10/4,3/1,0.6/0.6,3,0,,,3,60,,,,1200,,,,1,,, +Heavy Tank,HeavyTank,Armour,140,1/4,15/4,4/2,0.6/0.6,4,0,,,2,90,,,,1600,,,,1,,, +Super Heavy Tank,SuperHeavyTank,Armour,200,1/3,20/4,5/2,0.6/0.6,5,0,,0,2,120,,,,2400,,,,1,,, +Tankhunter,Tankhunter,Armour,100,1/2,16/4,4/2,0.7/0.7,2,0,,,2,90,,,,1200,,,,1,,, +Light Anti Tank Gun,LightAntiTankGun,Armour,20,2,8,3,0.7,1,0,,,0.5,,,,,,,,,,,, +Support Vehicle,SupportVehicle,Armour,,,,,,1,0,,,,,,,,,,,,,,, +Transport Vehicle,TransportVehicle,Armour,,,,,,1,0,,,,,,,,,,,,,,, +Flak Cannon,FlakCannon,Armour,20,6,5,0.5,0.7,1,,,,0.5,,,,,,,,,,,, +Flak Vehicle,FlakVehicle,Armour,,,,,0.65,1,,,,,,,,,,,,,,,, +Flak Truck,FlakTruck,Armour,,,,,0.6,1,,,,,,,,,,,,,,,, +Light Artillery Gun,LightArtilleryGun,Armour,20,,,,0.4,1,,,,0.5,,,,,,,,,,,, +Artillery Gun,Artillery Gun,Armour,24,1,22,1,0.5,1,,,,0.5,,,,,,,,,,,, +Heavy Artillery Gun,Heavy Artillery Gun,Armour,35,1,30,1.5,0.4,1,,,,0.3,,,,,,,,,,,, +Super Heavy Artillery Gun,Super Heavy Artillery Gun,Armour,40,1,50,2,0.3,2,,,,0.2,,,,,,,,,,,, +Mountain Brigade,Mountain Brigade,Infantry,,,,,,0,,,,,,,,,,,,,,,, +Heavy Mountain Brigade,Heavy Mountain Brigade,Infantry,,,,,,0.3,,,,,,,,,,,,,,,, +Rocket Artillery,Rocket Artillery,Armour,,,,,,0,,,,,,,,,,,,,,,, +Heavy Rocket Artillery,Heavy Rocket Artillery,Armour,,,,,,1,,,,,,,,,,,,,,,, +Commando Unit,Commando Unit,Infantry,,,,,0.7,0.3,,,,,,,,,,,,,,,, +Sniper Squad,Sniper Squad,Infantry,,,,,0.9,0,,,,,,,,,,,,,,,, +Demolition Squad,Demolition Squad,Infantry,,,,,,0,,,,,,,,,,,,,,,, +Tank Hunter Squad,Tank Hunter Squad,Infantry,,,,,,0.3,,,,,,,,,,,,,,,, +Artillery Tank,Artillery Tank,Armour,,,,,,2,,,,,,,,,,,,,,,, +Breacher Squad,Breacher Squad,Infantry,,,,,,0.5,,,,,,,,,,,,,,,, +Marine Squad,Marine Squad,Infantry,,,,,,0,,,,,,,,,,,,,,,, +Grav-Chute Squad,Grav-Chute Squad,Infantry,,,,,,0,,,,,,,,,,,,,,,, +Heavy Anti Tank Gun,Heavy Anti Tank Gun,Armour,,,,,,1,,,,,,,,,,,,,,,, +Anti Tank Gun,Anti Tank Gun,Armour,,,,,,1,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Rokurant,,,,,,,,,,,,,,,,,,,,,,,, +Heavy Artillery Tank,,,,,,,,3,,,,,,,,,,,,,,,, +Siegebreaker Tank,,,,,,,,3,,,,,,,,,,,,,,,, +Bulk Transporter,,,,,,,,3,,,,,,,,,,,,,,,, +Heavy Transport Vehicle,,,,,,,,3,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Voteine,,,,,,,,,,,,,,,,,,,,,,,, +Fast Assault Tank,,,,,,,,1,1,,,,,,,,,,,,,,, +Hover Tank,,,,,,,,2,1,,,,,,,,,,,,,,, +Light Hover Tank,,,,,,,,1,1,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Whythler,,,,,,,,,,,,,,,,,,,,,,,, +Jet-Bike Squads,,,,,,,,1,3,,,,,,,,,,,,,,, +Hover Tank,,,,,,,,2,4,,,,,,,,,,,,,,, +Wythler Squad,,,,,,,,1,2,,,,,,,,,,,,,,, +Power Armour Squad,,,,,,,,1,3,,,,,,,,,,,,,,, +Rabble,,,,,,,,0,0,,,,,,,,,,,,,,, +Wyth Palace Guard,,,,,,,,1,3,,,,,,,,,,,,,,, +Assassins,,,,,,,,0.3,1,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Elysia,,,,,,,,,,,,,,,,,,,,,,,, +Light Commando Vehicle,,,,,,,,,,,,,,,,,,,,,,,, +Elysian Knight Squad,,,,,,,,,1,,,,,,,,,,,,,,, +Elysian Mechs,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Yar-Kassy,,,,,,,,,,,,,,,,,,,,,,,, +Dervish Assault Tank,,,,,,,,,,,,,,,,,,,,,,,, +Desert Raider Squad,,,,,,,,,,,,,,,,,,,,,,,, +Elite Marksmen Squad,,,,,,,,,,,,,,,,,,,,,,,, +Ghar Haclem Achvenur Serpents,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Arca,,,,,,,,,,,,,,,,,,,,,,,, +Scum,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Zami,,,,,,,,,,,,,,,,,,,,,,,, +Cryo-Clone Squad,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Stunteen,,,,,,,,,,,,,,,,,,,,,,,, +Headtaker Commando,,,,,,,,,,,,,,,,,,,,,,,, +Hareen Cari Immortals,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Exan,,,,,,,,,,,,,,,,,,,,,,,, +Clan Warriors,,,,,,,,,,,,,,,,,,,,,,,, +Headtakers,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Methaphor,,,,,,,,,,,,,,,,,,,,,,,, +Republican Guard,,,,,,,,,,,,,,,,,,,,,,,, +Green Guard (Elite Mountain Troops),,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Noser,,,,,,,,,,,,,,,,,,,,,,,, +Royal Guard,,,,,,,,,,,,,,,,,,,,,,,, +Stalker Squad,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Caer Bannoq,,,,,,,,,,,,,,,,,,,,,,,, +Realm Knights,,,,,,,,,,,,,,,,,,,,,,,, +Keepers of Secrets,,,,,,,,,,,,,,,,,,,,,,,, +Paladins,,,,,,,,,,,,,,,,,,,,,,,, +Seekers,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Squad Upgrades:,,,,,,,,,,,,,,,,,,,,,,,, +Anti Tank Set,,,,,,,,,,,,,,,,,,,,,,,, +"Camoflage Set (Jungle, Desert, Standard Camo)",,,,,,,,,,,,,,,,,,,,,,,, +Anti Tank Rifles,,,,,,,,,,,,,,,,,,,,,,,, +Machine Gun,,,,,,,,,,,,,,,,,,,,,,,, +Multilaser,,,,,,,,,,,,,,,,,,,,,,,, +Flyer Fist,,,,,,,,,,,,,,,,,,,,,,,, +Explosives,,,,,,,,,,,,,,,,,,,,,,,, +,,,,,,,,,,,,,,,,,,,,,,,, +Tank Upgrades:,,,,,,,,,,,,,,,,,,,,,,,, +Command and Controll Module,,,,,,,,,,,,,,,,,,,,,,,, +Tank Camo,,,,,,,,,,,,,,,,,,,,,,,, +"Tracks (Jungle, Desert)",,,,,,,,,,,,,,,,,,,,,,,, \ No newline at end of file diff --git a/Assets/GWConquest/Scenes/GalaxyMap.unity b/Assets/GWConquest/Scenes/GalaxyMap.unity index 1948923..41403cc 100644 --- a/Assets/GWConquest/Scenes/GalaxyMap.unity +++ b/Assets/GWConquest/Scenes/GalaxyMap.unity @@ -7648,7 +7648,7 @@ PrefabInstance: - target: {fileID: 8496026405921973180, guid: fc3eae9e9964d5446a5c38fbf9a203bb, type: 3} propertyPath: FactoryType - value: 1 + value: 2 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: fc3eae9e9964d5446a5c38fbf9a203bb, type: 3} @@ -22098,7 +22098,7 @@ MonoBehaviour: PlayerColors: - {r: 1, g: 0.8901961, b: 0.5647059, a: 1} - {r: 0.8, g: 0.25490198, b: 0.14509805, a: 1} - - {r: 1, g: 0.8901961, b: 0.5647059, a: 1} + - {r: 0.8000001, g: 0.25490198, b: 0.14509805, a: 1} - {r: 0.8, g: 0.25490198, b: 0.14509805, a: 1} UnitClasses: [] PlanetData: @@ -22943,6 +22943,8 @@ MonoBehaviour: DistrictData: [] GroundTransitionLengthFactor: 30 SpaceTransitionLengthFactor: 1 + BattleTurnLength: 0 + SpawnAIPlayer: 1 --- !u!4 &426309784 Transform: m_ObjectHideFlags: 0 @@ -22951,7 +22953,7 @@ Transform: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 426309782} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 1128.9474, y: -2490.3516, z: -893.0568} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_Children: [] m_Father: {fileID: 0} @@ -33177,6 +33179,52 @@ PrefabInstance: objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: f42e8fb7bcfdc474a979ee5023161dc3, type: 3} +--- !u!1 &692834478 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 692834480} + - component: {fileID: 692834479} + m_Layer: 0 + m_Name: GameObject + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!114 &692834479 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 692834478} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e3fbe30dead34c49a8585bf21ae46af, type: 3} + m_Name: + m_EditorClassIdentifier: + unitName: Conscripts + unitCount: 5 + zone: {fileID: 801858043} +--- !u!4 &692834480 +Transform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 692834478} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: -1204.8986, y: -10800.732, z: 5110.4175} + m_LocalScale: {x: 1, y: 1, z: 1} + m_Children: [] + m_Father: {fileID: 0} + m_RootOrder: 13 + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1001 &693605575 PrefabInstance: m_ObjectHideFlags: 0 @@ -39114,7 +39162,7 @@ PrefabInstance: - target: {fileID: 8496026405921973180, guid: fc3eae9e9964d5446a5c38fbf9a203bb, type: 3} propertyPath: FactoryType - value: 1 + value: 2 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: fc3eae9e9964d5446a5c38fbf9a203bb, type: 3} @@ -53196,7 +53244,7 @@ PrefabInstance: - target: {fileID: 8496026405921973180, guid: fc3eae9e9964d5446a5c38fbf9a203bb, type: 3} propertyPath: FactoryType - value: 1 + value: 2 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: fc3eae9e9964d5446a5c38fbf9a203bb, type: 3} @@ -93022,7 +93070,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!82 &1873289113 AudioSource: m_ObjectHideFlags: 0 @@ -98239,7 +98287,7 @@ PrefabInstance: - target: {fileID: 8496026405921973180, guid: fc3eae9e9964d5446a5c38fbf9a203bb, type: 3} propertyPath: FactoryType - value: 1 + value: 2 objectReference: {fileID: 0} m_RemovedComponents: [] m_SourcePrefab: {fileID: 100100000, guid: fc3eae9e9964d5446a5c38fbf9a203bb, type: 3} diff --git a/Assets/GWConquest/Scripts/Battle.cs b/Assets/GWConquest/Scripts/Battle.cs new file mode 100644 index 0000000..ef2373b --- /dev/null +++ b/Assets/GWConquest/Scripts/Battle.cs @@ -0,0 +1,29 @@ +using UnityEngine; + +namespace GWConquest +{ + public class Battle : Bolt.EntityBehaviour + { + public EntityList FormationList; + + public Zone Zone { + get => Zone.GetFromId(state.Zone); + set => state.Zone = Zone.GetZoneId(value); + } + + public override void Attached() + { + FormationList = new EntityList(state, "FormationList"); + } + + public void AddFormation(Formation f) + { + FormationList.Add(f.entity); + } + + public void RemoveFormation(Formation f) + { + FormationList.Remove(f.entity); + } + } +} \ No newline at end of file diff --git a/Assets/GWConquest/Scripts/Battle.cs.meta b/Assets/GWConquest/Scripts/Battle.cs.meta new file mode 100644 index 0000000..4a0a2fc --- /dev/null +++ b/Assets/GWConquest/Scripts/Battle.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 702759caf9c0c0142bf15cb9cb079f0b +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GWConquest/Scripts/BoltList.cs b/Assets/GWConquest/Scripts/BoltList.cs index 4e278cc..1713bea 100644 --- a/Assets/GWConquest/Scripts/BoltList.cs +++ b/Assets/GWConquest/Scripts/BoltList.cs @@ -7,7 +7,7 @@ using UdpKit; namespace GWConquest { - public class BoltList : IList + public abstract class BoltList : IList where TokenClass : BoltListToken, new() { private IState state; private string propertyName; @@ -15,22 +15,20 @@ namespace GWConquest private Func readMethod; private Action writeMethod; - public BoltList(IState _state, string _propertyName, Func _readMethod, Action _writeMethod) + public BoltList(IState _state, string _propertyName) { state = _state; propertyName = _propertyName; - readMethod = _readMethod; - writeMethod = _writeMethod; } - private BoltListToken Token + private TokenClass Token { get { - BoltListToken token = state.GetDynamic(propertyName) as BoltListToken; + TokenClass token = state.GetDynamic(propertyName) as TokenClass; if (token == null) { - return new BoltListToken(readMethod, writeMethod); + return new TokenClass(); } else { @@ -40,7 +38,7 @@ namespace GWConquest set => state.SetDynamic(propertyName, value); } - public void FromToken(BoltListToken token) + public void FromToken(TokenClass token) { Token = token; } @@ -64,13 +62,13 @@ namespace GWConquest if (!Contains(item)) { - Token = new BoltListToken(readMethod, writeMethod, Token.entries.Append(item)); + Token = new TokenClass().SetEntries(Token.entries.Append(item)) as TokenClass; } } public void Clear() { - Token = new BoltListToken(readMethod, writeMethod); + Token = new TokenClass(); } public bool Contains(T item) @@ -97,7 +95,7 @@ namespace GWConquest { List list = Token.entries.ToList(); list.Insert(index, item); - Token = new BoltListToken(readMethod, writeMethod, list); + Token = new TokenClass().SetEntries(list) as TokenClass; } public bool Remove(T item) @@ -105,7 +103,7 @@ namespace GWConquest List list = Token.entries.ToList(); if (list.Remove(item)) { - Token = new BoltListToken(readMethod, writeMethod, list); + Token = new TokenClass().SetEntries(list) as TokenClass; return true; } else return false; @@ -115,7 +113,7 @@ namespace GWConquest { List list = Token.entries.ToList(); list.RemoveAt(index); - Token = new BoltListToken(readMethod, writeMethod, list); + Token = new TokenClass().SetEntries(list) as TokenClass; } IEnumerator IEnumerable.GetEnumerator() @@ -124,25 +122,19 @@ namespace GWConquest } } - public class BoltListToken : IProtocolToken + public abstract class BoltListToken : IProtocolToken { - public BoltListToken(Func _readMethod, Action _writeMethod) + public BoltListToken() { entries = new T[0]; - readMethod = _readMethod; - writeMethod = _writeMethod; } - public BoltListToken(Func _readMethod, Action _writeMethod, IEnumerable _entities) + public BoltListToken SetEntries(IEnumerable _entities) { entries = _entities.ToArray(); - readMethod = _readMethod; - writeMethod = _writeMethod; + return this; } - private Func readMethod; - private Action writeMethod; - public T[] entries { get; private set; } public void Read(UdpPacket packet) @@ -152,7 +144,7 @@ namespace GWConquest entries = new T[count]; for (int i = 0; i < count; i++) { - entries[i] = readMethod(packet); + entries[i] = ReadEntry(packet); } BoltLog.Info("Finished reading Bolt list {0}", this); } @@ -163,7 +155,7 @@ namespace GWConquest packet.WriteInt(entries.Length); foreach (T e in entries) { - writeMethod(packet, e); + WriteEntry(packet, e); } BoltLog.Info("Finished writing Bolt list {0}", this); } @@ -173,14 +165,26 @@ namespace GWConquest return "BoltList " + Util.PrintEnumerable(entries); } + public abstract T ReadEntry(UdpPacket packet); + + public abstract void WriteEntry(UdpPacket packet, T entry); + } - public class ZoneList : BoltList - { - public ZoneList(IState _state, string _propertyName) : base(_state, _propertyName, packet => Zone.GetFromId(packet.ReadInt()), (packet, zone) => packet.WriteInt(Zone.GetZoneId(zone))) + public class ZoneListToken : BoltListToken { + public override Zone ReadEntry(UdpPacket packet) { + return Zone.GetFromId(packet.ReadInt()); + } + public override void WriteEntry(UdpPacket packet, Zone entry) + { + packet.WriteInt(Zone.GetZoneId(entry)); } + } + public class ZoneList : BoltList + { + public ZoneList(IState _state, string _propertyName) : base(_state, _propertyName) {} } } \ No newline at end of file diff --git a/Assets/GWConquest/Scripts/DistrictFactory.cs b/Assets/GWConquest/Scripts/DistrictFactory.cs index 463a184..bc387bf 100644 --- a/Assets/GWConquest/Scripts/DistrictFactory.cs +++ b/Assets/GWConquest/Scripts/DistrictFactory.cs @@ -31,7 +31,7 @@ namespace GWConquest { for(int i = 0; i < MaxQueueLength; i++) { - if(state.ProductionQueue[i].UnitClass == null) + if(Util.IsStringEmpty(state.ProductionQueue[i].UnitClass)) { return i; } @@ -44,7 +44,7 @@ namespace GWConquest { get { - return state.ProductionQueue[0].UnitClass != null; + return !Util.IsStringEmpty(state.ProductionQueue[0].UnitClass); } } @@ -60,7 +60,12 @@ namespace GWConquest public float GetProductionPercentage(int i) { - return GetProductionTime(i) / GetProductionQueueEntry(i).BuildTime; + var entry = GetProductionQueueEntry(i); + if(entry != null) + { + return GetProductionTime(i) / GetProductionQueueEntry(i).BuildTime; + } + else return 0; } public void RemoveProductionQueueEntry(int index) @@ -69,6 +74,7 @@ namespace GWConquest { state.ProductionQueue[index].UnitClass = null; state.ProductionQueue[index].TimeProduced = 0f; + state.ProductionQueue[index].Player = null; } else { @@ -77,18 +83,20 @@ namespace GWConquest var nextEntry = state.ProductionQueue[i + 1]; state.ProductionQueue[i].UnitClass = nextEntry.UnitClass; state.ProductionQueue[i].TimeProduced = nextEntry.TimeProduced; - if (nextEntry.UnitClass == null) + state.ProductionQueue[i].Player = nextEntry.Player; + if (Util.IsStringEmpty(nextEntry.UnitClass)) { return; } } state.ProductionQueue[MaxQueueLength - 1].UnitClass = null; state.ProductionQueue[MaxQueueLength - 1].TimeProduced = 0f; + state.ProductionQueue[MaxQueueLength - 1].Player = null; } } - public void AddProductionQueueEntry(string uc) + public void AddProductionQueueEntry(string uc, Player player) { int length = ProductionQueueLength; if(length < MaxQueueLength) @@ -96,6 +104,7 @@ namespace GWConquest BoltLog.Info("Adding unit {0} to production queue on district {1}", uc, gameObject.name); state.ProductionQueue[length].UnitClass = uc; state.ProductionQueue[length].TimeProduced = 0f; + state.ProductionQueue[length].Player = player.entity; } } @@ -112,8 +121,7 @@ namespace GWConquest Zone zone = GetComponent(); if(zone != null) { - // TODO correct player when zones are under control - Unit.SpawnUnit(zone, uc, Player.CurrentPlayer); + Unit.SpawnUnit(zone, uc, state.ProductionQueue[0].Player.GetComponent()); } else { diff --git a/Assets/GWConquest/Scripts/Formation.cs b/Assets/GWConquest/Scripts/Formation.cs index 04201d8..0ef3c6a 100644 --- a/Assets/GWConquest/Scripts/Formation.cs +++ b/Assets/GWConquest/Scripts/Formation.cs @@ -8,11 +8,6 @@ namespace GWConquest { public class Formation : Bolt.EntityBehaviour, IMovable { - public static Formation selectedFormation; - - [HideInInspector] - public GameObject unitIconPrefab; - private Zone lastZone; public Zone currentZone { @@ -23,29 +18,33 @@ namespace GWConquest set { state.CurrentZone = Zone.GetZoneId(value); + OnZoneChanged(); } } private void OnZoneChanged() - { + { Zone newZone = Zone.GetFromId(state.CurrentZone); - if(lastZone != null) - { - lastZone.OnFormationDeparting(this); - } - if(newZone != null) + if(lastZone != newZone) { - newZone.OnFormationArrived(this); - } - BoltLog.Info("Current zone changed from {0} to {1} on formation {2}", lastZone, newZone, this); - lastZone = newZone; + if(lastZone != null) + { + lastZone.OnFormationDeparting(this); + } + if(newZone != null) + { + newZone.OnFormationArrived(this); + } + BoltLog.Info("Current zone changed from {0} to {1} on formation {2}", lastZone, newZone, this); + lastZone = newZone; + } } public Player Player { get { - return state.Player.GetComponent(); + return state.Player?.GetComponent(); } set { @@ -111,8 +110,7 @@ namespace GWConquest evnt.TargetZone = Zone.GetZoneId(path[1]); if(path.Count > 2) { - BoltListToken zoneListToken = new BoltListToken( - packet => Zone.GetFromId(packet.ReadInt()), (packet, zone) => packet.WriteInt(Zone.GetZoneId(zone)), + var zoneListToken = new ZoneListToken().SetEntries( path.GetRange(2, path.Count-2).ToArray()); evnt.PathQueue = zoneListToken; @@ -155,7 +153,7 @@ namespace GWConquest { if(state.CurrentTransition.IsCurved) { movingArmyIcon = Instantiate(movingArmyPrefab); - movingArmyIcon.transform.SetParent(FindObjectOfType().DistrictIcons); + movingArmyIcon.transform.SetParent(FindObjectOfType().PlanetView.DistrictIcons); movingArmyIcon.transform.localRotation = Quaternion.identity; movingArmyIcon.GetComponent().target = transform; movingArmyIcon.GetComponentInChildren().color = Player.Color; diff --git a/Assets/GWConquest/Scripts/GameManager.cs b/Assets/GWConquest/Scripts/GameManager.cs index 37d4575..a52806a 100644 --- a/Assets/GWConquest/Scripts/GameManager.cs +++ b/Assets/GWConquest/Scripts/GameManager.cs @@ -12,6 +12,10 @@ namespace GWConquest public float GroundTransitionLengthFactor; public float SpaceTransitionLengthFactor; + public float BattleTurnLength; + + public bool SpawnAIPlayer; + private static GameManager _instance; public static GameManager Instance { @@ -19,6 +23,10 @@ namespace GWConquest if(_instance == null) { _instance = FindObjectOfType(); + if(_instance == null) + { + BoltLog.Warn("Found no Game Manager instance!"); + } } return _instance; } @@ -26,9 +34,24 @@ namespace GWConquest private void Awake() { + if(_instance == null) + { + _instance = this; + } + UnitClass.LoadClassMap(); PlanetRegistry.Load(); } + public void OnSceneLoadLocalDone() + { + if(SpawnAIPlayer) + { + BoltEntity playerEntity = BoltNetwork.Instantiate(BoltPrefabs.Player); + IPlayerState playerState = playerEntity.GetState(); ; + playerState.IsAI = true; + } + } + } } \ No newline at end of file diff --git a/Assets/GWConquest/Scripts/GlobalCallbacks.cs b/Assets/GWConquest/Scripts/GlobalCallbacks.cs index a454ed7..270b2a9 100644 --- a/Assets/GWConquest/Scripts/GlobalCallbacks.cs +++ b/Assets/GWConquest/Scripts/GlobalCallbacks.cs @@ -9,6 +9,7 @@ namespace GWConquest { Debug.Log("Calling global callbacks..."); BoltNetwork.RegisterTokenClass(); + BoltNetwork.RegisterTokenClass(); } } } \ No newline at end of file diff --git a/Assets/GWConquest/Scripts/Player.cs b/Assets/GWConquest/Scripts/Player.cs index f2955c4..0fcb05c 100644 --- a/Assets/GWConquest/Scripts/Player.cs +++ b/Assets/GWConquest/Scripts/Player.cs @@ -23,8 +23,12 @@ namespace GWConquest { state.PlayerId = PlayerList.IndexOf(this); GameManager gm = GameManager.Instance; - int color = state.PlayerId % gm.PlayerColors.Length; - Color = gm.PlayerColors[color]; + if(gm != null) + { + int color = state.PlayerId % gm.PlayerColors.Length; + Color = gm.PlayerColors[color]; + } + } } @@ -43,7 +47,7 @@ namespace GWConquest { get { - if(state.IsHost) + if(state.IsAI || state.IsHost) { return null; } @@ -60,7 +64,7 @@ namespace GWConquest { entity.TakeControl(); } - else + else if(!state.IsAI) { entity.AssignControl(Connection); } diff --git a/Assets/GWConquest/Scripts/ServerCallbacks.cs b/Assets/GWConquest/Scripts/ServerCallbacks.cs index 242e84c..9e925e6 100644 --- a/Assets/GWConquest/Scripts/ServerCallbacks.cs +++ b/Assets/GWConquest/Scripts/ServerCallbacks.cs @@ -1,4 +1,5 @@ using System.Linq; +using UnityEngine; namespace GWConquest { @@ -12,9 +13,13 @@ namespace GWConquest IPlayerState playerState = playerEntity.GetState(); ; playerState.IsHost = true; playerEntity.TakeControl(); + + foreach(GameObject go in FindObjectsOfType()) { + go.SendMessage("OnSceneLoadLocalDone", SendMessageOptions.DontRequireReceiver); + } } - public override void Connected(BoltConnection connection) + public override void SceneLoadRemoteDone(BoltConnection connection) { BoltEntity playerEntity = BoltNetwork.Instantiate(BoltPrefabs.Player); IPlayerState playerState = playerEntity.GetState(); @@ -53,7 +58,7 @@ namespace GWConquest formation.MoveToZone(targetZone); if(evnt.PathQueue != null) { - var queueToken = evnt.PathQueue as BoltListToken; + var queueToken = evnt.PathQueue as ZoneListToken; formation.PathQueue.FromToken(queueToken); } } @@ -61,7 +66,7 @@ namespace GWConquest public override void OnEvent(AddProductionEvent evnt) { DistrictFactory factory = evnt.Factory.GetComponent(); - factory.AddProductionQueueEntry(evnt.UnitClass); + factory.AddProductionQueueEntry(evnt.UnitClass, evnt.Player.GetComponent()); } } } \ No newline at end of file diff --git a/Assets/GWConquest/Scripts/SpawnAIUnits.cs b/Assets/GWConquest/Scripts/SpawnAIUnits.cs new file mode 100644 index 0000000..993c1aa --- /dev/null +++ b/Assets/GWConquest/Scripts/SpawnAIUnits.cs @@ -0,0 +1,27 @@ +using UnityEngine; +using System.Linq; + +namespace GWConquest { + + public class SpawnAIUnits : MonoBehaviour + { + + public string unitName; + public int unitCount; + public Zone zone; + + public void OnSceneLoadLocalDone() + { + BoltLog.Info("Spawning AI units"); + + Player player = FindObjectsOfType().FirstOrDefault(p => p.state.IsAI); + if(player != null) + { + for(int i = 0; i < unitCount; i++) + { + Unit.SpawnUnit(zone, UnitClass.FromName(unitName), player); + } + } + } + } +} \ No newline at end of file diff --git a/Assets/GWConquest/Scripts/SpawnAIUnits.cs.meta b/Assets/GWConquest/Scripts/SpawnAIUnits.cs.meta new file mode 100644 index 0000000..b60b385 --- /dev/null +++ b/Assets/GWConquest/Scripts/SpawnAIUnits.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 4e3fbe30dead34c49a8585bf21ae46af +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/GWConquest/Scripts/UI/DistrictIcon.cs b/Assets/GWConquest/Scripts/UI/DistrictIcon.cs index 11b0143..20f0113 100644 --- a/Assets/GWConquest/Scripts/UI/DistrictIcon.cs +++ b/Assets/GWConquest/Scripts/UI/DistrictIcon.cs @@ -29,7 +29,7 @@ namespace GWConquest { animator.SetTrigger("Pressed"); isSelected = true; - FindObjectOfType().SelectZone(district.Zone); + FindObjectOfType().PlanetView.SelectZone(district.Zone); } public void OnDeselected() @@ -73,6 +73,7 @@ namespace GWConquest if (enemyStrength > 0f) { Player enemyPlayer = formations.FirstOrDefault(f => f.Player != Player.CurrentPlayer)?.Player; + Debug.Log(enemyPlayer); EnemyIndicator.gameObject.SetActive(true); EnemyIndicator.UpdateContinuous(enemyStrength, enemyPlayer?.Color); diff --git a/Assets/GWConquest/Scripts/UI/GalaxyMapUI.cs b/Assets/GWConquest/Scripts/UI/GalaxyMapUI.cs index 24597db..0e1a619 100644 --- a/Assets/GWConquest/Scripts/UI/GalaxyMapUI.cs +++ b/Assets/GWConquest/Scripts/UI/GalaxyMapUI.cs @@ -39,7 +39,7 @@ namespace GWConquest Renderer r = PlanetSelection.GetComponentInChildren(); if(Player.CurrentPlayer != null) { - r.material.color.UpdateColorRGB(Player.CurrentPlayer.Color); + r.material.color = r.material.color.UpdateColorRGB(Player.CurrentPlayer.Color); } PlanetNameText.text = SelectedPlanet.planetName; diff --git a/Assets/GWConquest/Scripts/UI/PlanetIndicatorUI.cs b/Assets/GWConquest/Scripts/UI/PlanetIndicatorUI.cs index 1f0d913..e00ed4a 100644 --- a/Assets/GWConquest/Scripts/UI/PlanetIndicatorUI.cs +++ b/Assets/GWConquest/Scripts/UI/PlanetIndicatorUI.cs @@ -39,7 +39,7 @@ namespace GWConquest { PlayerIndicator.SetActive(true); PlayerIndicatorBar.fillAmount = Mathf.Clamp01(playerStrength / MaxFormationStrength) * MaxFillAmount; - PlayerIndicatorBar.color.UpdateColorRGB(Player.CurrentPlayer.Color); + PlayerIndicatorBar.color = PlayerIndicatorBar.color.UpdateColorRGB(Player.CurrentPlayer.Color); } else { @@ -53,7 +53,7 @@ namespace GWConquest Player enemyPlayer = formations.FirstOrDefault(f => f.Player != Player.CurrentPlayer)?.Player; if(enemyPlayer != null) { - EnemyIndicatorBar.color.UpdateColorRGB(enemyPlayer.Color); + EnemyIndicatorBar.color = EnemyIndicatorBar.color.UpdateColorRGB(enemyPlayer.Color); } } diff --git a/Assets/GWConquest/Scripts/UI/ProductionMenu.cs b/Assets/GWConquest/Scripts/UI/ProductionMenu.cs index 0d8e95a..0d4ac16 100644 --- a/Assets/GWConquest/Scripts/UI/ProductionMenu.cs +++ b/Assets/GWConquest/Scripts/UI/ProductionMenu.cs @@ -140,6 +140,7 @@ namespace GWConquest AddProductionEvent ev = AddProductionEvent.Create(Bolt.GlobalTargets.OnlyServer); ev.Factory = factory.entity; ev.UnitClass = uc.ShortName; + ev.Player = Player.CurrentPlayer.entity; ev.Send(); } } diff --git a/Assets/GWConquest/Scripts/UI/StrengthIndicator.cs b/Assets/GWConquest/Scripts/UI/StrengthIndicator.cs index 779ff64..e231054 100644 --- a/Assets/GWConquest/Scripts/UI/StrengthIndicator.cs +++ b/Assets/GWConquest/Scripts/UI/StrengthIndicator.cs @@ -15,14 +15,17 @@ namespace GWConquest StrengthBar.fillAmount = Mathf.Ceil(s) / MaxFillAmount; if(color.HasValue) { - StrengthBar.color.UpdateColorRGB(color.Value); + StrengthBar.color = StrengthBar.color.UpdateColorRGB(color.Value); } } public void UpdateContinuous(float strength, Color? color = null) { StrengthBar.fillAmount = Mathf.Clamp01(strength / MaxFormationStrength) * MaxFillAmount; - StrengthBar.color.UpdateColorRGB(Player.CurrentPlayer.Color); + if(color.HasValue) + { + StrengthBar.color = StrengthBar.color.UpdateColorRGB(color.Value); + } } } } \ No newline at end of file diff --git a/Assets/GWConquest/Scripts/Unit.cs b/Assets/GWConquest/Scripts/Unit.cs index 9738500..10ef829 100644 --- a/Assets/GWConquest/Scripts/Unit.cs +++ b/Assets/GWConquest/Scripts/Unit.cs @@ -44,14 +44,15 @@ namespace GWConquest BoltEntity formationEntity = BoltNetwork.Instantiate(BoltPrefabs.Formation); player.AssignControl(formationEntity); playerFormation = formationEntity.GetComponent(); - playerFormation.currentZone = zone; playerFormation.Player = player; + playerFormation.currentZone = zone; } BoltEntity unitEntity = BoltNetwork.Instantiate(BoltPrefabs.Unit); player.AssignControl(unitEntity); Unit unit = unitEntity.GetComponent(); unit.Class = uc; + unit.state.Hitpoints = uc.Hitpoints; unit.Formation = playerFormation; playerFormation.UnitEntities.Add(unitEntity); diff --git a/Assets/GWConquest/Scripts/UnitClass.cs b/Assets/GWConquest/Scripts/UnitClass.cs index bad11e9..7fa3a9c 100644 --- a/Assets/GWConquest/Scripts/UnitClass.cs +++ b/Assets/GWConquest/Scripts/UnitClass.cs @@ -46,11 +46,10 @@ namespace GWConquest int[] attackCounts = data.GetIntArray("Attack Count"); int[] damages = data.GetIntArray("Damage"); - int[] penetrations = data.GetIntArray("Penetration"); + float[] penetrations = data.GetFloatArray("Penetration"); float[] accuracies = data.GetFloatArray("Accuracy"); - float[] attackTimers = data.GetFloatArray("Attack Timer"); - if (Util.AllEqual(attackCounts.Length, damages.Length, penetrations.Length, accuracies.Length, attackTimers.Length)) + if (Util.AllEqual(attackCounts.Length, damages.Length, penetrations.Length, accuracies.Length)) { unitClass.WeaponStatsArray = new WeaponStats[attackCounts.Length]; for (int j = 0; j < attackCounts.Length; j++) @@ -61,7 +60,6 @@ namespace GWConquest Damage = damages[j], Penetration = penetrations[j], Accuracy = accuracies[j], - AttackTimer = attackTimers[j] }; } } @@ -70,9 +68,10 @@ namespace GWConquest throw new FormatException("Unequal length in weapon stats!"); } - unitClass.Armour = data.GetInt("Armour"); + unitClass.Armour = data.GetFloat("Armour"); unitClass.Evasion = data.GetFloat("Evasion"); unitClass.Movement = data.GetFloat("Movement"); + unitClass.Size = data.GetInt("Size"); unitClass.BuildCost = new BuildCost { @@ -131,6 +130,11 @@ namespace GWConquest { LoadClassMap(); } + if(Util.IsStringEmpty(name)) + { + BoltLog.Warn("UnitClass.FromName called with null name!"); + return null; + } if (classMap.ContainsKey(name)) { return classMap[name]; @@ -164,9 +168,10 @@ namespace GWConquest public float UnitStrength; public int Hitpoints; - public int Armour; + public float Armour; public float Evasion; public float Movement; + public int Size; public WeaponStats[] WeaponStatsArray; @@ -198,9 +203,8 @@ namespace GWConquest { public int AttackCount; public int Damage; - public int Penetration; + public float Penetration; public float Accuracy; - public float AttackTimer; } [System.Serializable] diff --git a/Assets/GWConquest/Scripts/Util.cs b/Assets/GWConquest/Scripts/Util.cs index 2495aef..986e412 100644 --- a/Assets/GWConquest/Scripts/Util.cs +++ b/Assets/GWConquest/Scripts/Util.cs @@ -103,11 +103,9 @@ namespace GWConquest } } - public static void UpdateColorRGB(this Color color, Color newColor) + public static Color UpdateColorRGB(this Color color, Color newColor) { - color.r = newColor.r; - color.g = newColor.g; - color.b = newColor.b; + return new Color(newColor.r, newColor.g, newColor.b, color.a); } public static Vector3 SmoothDampEulerAngles(Vector3 current, Vector3 target, ref Vector3 velocity, float smoothTime) @@ -177,6 +175,11 @@ namespace GWConquest return minArg; } + public static bool IsStringEmpty(string str) + { + return str == null || str == ""; + } + } } \ No newline at end of file diff --git a/Assets/GWConquest/Scripts/Zone.cs b/Assets/GWConquest/Scripts/Zone.cs index 5281277..6c2c425 100644 --- a/Assets/GWConquest/Scripts/Zone.cs +++ b/Assets/GWConquest/Scripts/Zone.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using UnityEngine; +using System.Linq; namespace GWConquest { @@ -10,6 +11,9 @@ namespace GWConquest [System.NonSerialized] public ZoneType zoneType; + [System.NonSerialized] + public Battle CurrentBattle; + [SerializeField] private int zoneId; @@ -76,12 +80,48 @@ namespace GWConquest { formations.Add(formation); OnFormationChanged(formation); + + if (BoltNetwork.IsServer) + { + if (CurrentBattle != null) + { + CurrentBattle.AddFormation(formation); + } + else + { + if (ShouldStartBattle()) + { + var battleEntity = BoltNetwork.Instantiate(BoltPrefabs.Battle); + CurrentBattle = battleEntity.GetComponent(); + CurrentBattle.Zone = this; + foreach (Formation f in formations) + { + CurrentBattle.AddFormation(f); + } + } + } + } + + } + + public bool ShouldStartBattle() + { + return formations.Select((f, i) => f.Player).Distinct().Count() > 1; } public void OnFormationDeparting(Formation formation) { formations.Remove(formation); OnFormationChanged(formation); + + if (BoltNetwork.IsServer) + { + if (CurrentBattle != null) + { + CurrentBattle.RemoveFormation(formation); + } + } + } public void OnFormationChanged(Formation formation) diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll b/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll index 04f8223..b568d51 100644 Binary files a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll and b/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll differ diff --git a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb b/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb index 4957380..63d01c1 100644 Binary files a/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb and b/Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb differ diff --git a/Assets/Photon/PhotonBolt/project.json b/Assets/Photon/PhotonBolt/project.json index 664f0d0..e32c176 100644 --- a/Assets/Photon/PhotonBolt/project.json +++ b/Assets/Photon/PhotonBolt/project.json @@ -108,6 +108,23 @@ "ExtrapolationMaxFrames": 9, "SnapMagnitude": 10.0 } + }, + { + "Name": "CurrentBattle", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeEntity, bolt.compiler" + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler", + "ExtrapolationErrorTolerance": 0.25, + "_ExtrapolationCorrectionFrames": 6, + "ExtrapolationMaxFrames": 9, + "SnapMagnitude": 10.0 + } } ], "PacketMaxBits": 512, @@ -358,6 +375,23 @@ "ExtrapolationMaxFrames": 9, "SnapMagnitude": 10.0 } + }, + { + "Name": "IsAI", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeBool, bolt.compiler" + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler", + "ExtrapolationErrorTolerance": 0.25, + "_ExtrapolationCorrectionFrames": 6, + "ExtrapolationMaxFrames": 9, + "SnapMagnitude": 10.0 + } } ], "PacketMaxBits": 512, @@ -567,6 +601,42 @@ "ExtrapolationMaxFrames": 9, "SnapMagnitude": 10.0 } + }, + { + "Name": "Hitpoints", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeInteger, bolt.compiler", + "MaxValue": 255 + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler", + "ExtrapolationErrorTolerance": 0.25, + "_ExtrapolationCorrectionFrames": 6, + "ExtrapolationMaxFrames": 9, + "SnapMagnitude": 10.0 + } + }, + { + "Name": "RevealState", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeInteger, bolt.compiler", + "MaxValue": 255 + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler", + "ExtrapolationErrorTolerance": 0.25, + "_ExtrapolationCorrectionFrames": 6, + "ExtrapolationMaxFrames": 9, + "SnapMagnitude": 10.0 + } } ], "PacketMaxBits": 512, @@ -766,6 +836,19 @@ "AssetSettings": { "$type": "Bolt.Compiler.PropertyEventSettings, bolt.compiler" } + }, + { + "Name": "Player", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeEntity, bolt.compiler" + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyEventSettings, bolt.compiler" + } } ], "Name": "AddProductionEvent", @@ -818,11 +901,204 @@ "ExtrapolationMaxFrames": 9, "SnapMagnitude": 10.0 } + }, + { + "Name": "Player", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeEntity, bolt.compiler" + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler", + "ExtrapolationErrorTolerance": 0.25, + "_ExtrapolationCorrectionFrames": 6, + "ExtrapolationMaxFrames": 9, + "SnapMagnitude": 10.0 + } } ], "Name": "QueueEntry", "Guid": "1cc5b915-f4e9-46d4-bae3-de6b38d6dd82", "Groups": [] + }, + { + "$type": "Bolt.Compiler.StateDefinition, bolt.compiler", + "Properties": [ + { + "Name": "FormationList", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeProtocolToken, bolt.compiler" + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler", + "ExtrapolationErrorTolerance": 0.25, + "_ExtrapolationCorrectionFrames": 6, + "ExtrapolationMaxFrames": 9, + "SnapMagnitude": 10.0 + } + }, + { + "Name": "Zone", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeInteger, bolt.compiler", + "MaxValue": 255 + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler", + "ExtrapolationErrorTolerance": 0.25, + "_ExtrapolationCorrectionFrames": 6, + "ExtrapolationMaxFrames": 9, + "SnapMagnitude": 10.0 + } + }, + { + "Name": "BattleName", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeString, bolt.compiler", + "MaxLength": 1 + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler", + "ExtrapolationErrorTolerance": 0.25, + "_ExtrapolationCorrectionFrames": 6, + "ExtrapolationMaxFrames": 9, + "SnapMagnitude": 10.0 + } + } + ], + "PacketMaxBits": 512, + "PacketMaxProperties": 16, + "InitialPositionCompression": { + "Compression": [ + { + "MinValue": -1024, + "MaxValue": 1024, + "Accuracy": 0.01, + "Pack": 100.0, + "Read": 0.01, + "Shift": 1024.0, + "BitsRequired": 18 + }, + { + "MinValue": -1024, + "MaxValue": 1024, + "Accuracy": 0.01, + "Pack": 100.0, + "Read": 0.01, + "Shift": 1024.0, + "BitsRequired": 18 + }, + { + "MinValue": -1024, + "MaxValue": 1024, + "Accuracy": 0.01, + "Pack": 100.0, + "Read": 0.01, + "Shift": 1024.0, + "BitsRequired": 18 + } + ] + }, + "InitialRotationCompression": { + "EulerCompression": [ + { + "MaxValue": 360, + "Accuracy": 1.0, + "Pack": 1.0, + "Read": 1.0, + "BitsRequired": 9 + }, + { + "MaxValue": 360, + "Accuracy": 1.0, + "Pack": 1.0, + "Read": 1.0, + "BitsRequired": 9 + }, + { + "MaxValue": 360, + "Accuracy": 1.0, + "Pack": 1.0, + "Read": 1.0, + "BitsRequired": 9 + } + ], + "QuaternionCompression": { + "MinValue": -1, + "MaxValue": 1, + "Accuracy": 0.01, + "Pack": 100.0, + "Read": 0.01, + "Shift": 1.0, + "BitsRequired": 8 + } + }, + "Name": "BattleState", + "Guid": "4b486c12-bb55-4fb6-88f3-1a16218c67cf", + "Groups": [] + }, + { + "$type": "Bolt.Compiler.EventDefinition, bolt.compiler", + "Properties": [ + { + "Name": "Attacker", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeEntity, bolt.compiler" + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyEventSettings, bolt.compiler" + } + }, + { + "Name": "Target", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeEntity, bolt.compiler" + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyEventSettings, bolt.compiler" + } + }, + { + "Name": "Action", + "Enabled": true, + "Expanded": true, + "ReplicationMode": 1, + "Priority": 1, + "PropertyType": { + "$type": "Bolt.Compiler.PropertyTypeString, bolt.compiler", + "MaxLength": 1 + }, + "AssetSettings": { + "$type": "Bolt.Compiler.PropertyEventSettings, bolt.compiler" + } + } + ], + "Name": "AddBattleLogEvent", + "Guid": "7c2a7f70-ed97-4ff2-9a1b-dfcd08fe6c1e", + "Groups": [] } ], "ActiveGroup": "Everything" diff --git a/Assets/Photon/PhotonBolt/resources/BoltPrefabDatabase.asset b/Assets/Photon/PhotonBolt/resources/BoltPrefabDatabase.asset index 765dcc3..5ae9003 100644 --- a/Assets/Photon/PhotonBolt/resources/BoltPrefabDatabase.asset +++ b/Assets/Photon/PhotonBolt/resources/BoltPrefabDatabase.asset @@ -15,6 +15,7 @@ MonoBehaviour: DatabaseMode: 0 Prefabs: - {fileID: 0} + - {fileID: 2057280478138210166, guid: 12e1714c02c111f4e9d6981ad8f8036b, type: 3} - {fileID: 1355812926097278600, guid: fc3eae9e9964d5446a5c38fbf9a203bb, type: 3} - {fileID: 8292977142823461082, guid: 6af4ad43e05dcb344bfd726895735387, type: 3} - {fileID: 3262827332414082260, guid: f05198a1b03fe2b4e8042a9349c41aa3, type: 3}