Browse Source

UI Verbesserungen, Flottenbewegung

bolt_update
laurids 4 years ago
parent
commit
806a9d5339
19 changed files with 566 additions and 50 deletions
  1. +114
    -3
      Assets/GWConquest/Prefabs/Formation.prefab
  2. +172
    -20
      Assets/GWConquest/Scenes/GalaxyMap.unity
  3. +54
    -0
      Assets/GWConquest/Scripts/DragDropElement.cs
  4. +11
    -0
      Assets/GWConquest/Scripts/DragDropElement.cs.meta
  5. +1
    -1
      Assets/GWConquest/Scripts/FleetPanelUI.cs
  6. +7
    -21
      Assets/GWConquest/Scripts/Formation.cs
  7. +20
    -1
      Assets/GWConquest/Scripts/FormationUI.cs
  8. +8
    -0
      Assets/GWConquest/Scripts/GalaxyMapUI.cs
  9. +22
    -0
      Assets/GWConquest/Scripts/GameManager.cs
  10. +11
    -0
      Assets/GWConquest/Scripts/GameManager.cs.meta
  11. +1
    -1
      Assets/GWConquest/Scripts/MainMenu.cs
  12. +7
    -0
      Assets/GWConquest/Scripts/Player.cs
  13. +8
    -0
      Assets/GWConquest/Textures/Icons/Materials.meta
  14. +84
    -0
      Assets/GWConquest/Textures/Icons/Materials/Fleet Moving.mat
  15. +8
    -0
      Assets/GWConquest/Textures/Icons/Materials/Fleet Moving.mat.meta
  16. BIN
      Assets/Photon/PhotonBolt/assemblies/bolt.user.dll
  17. BIN
      Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb
  18. +35
    -0
      Assets/Photon/PhotonBolt/project.json
  19. +3
    -3
      ProjectSettings/EditorBuildSettings.asset

+ 114
- 3
Assets/GWConquest/Prefabs/Formation.prefab View File

@ -1,5 +1,115 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3797021628422937969
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 583456351474062817}
- component: {fileID: 7088160373850904865}
- component: {fileID: 7234933202352670106}
- component: {fileID: 6378984856010298829}
- component: {fileID: 7309519380391567729}
m_Layer: 0
m_Name: Quad
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &583456351474062817
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3797021628422937969}
m_LocalRotation: {x: 0.7071057, y: 0.00000017881392, z: 0.00000008940696, w: 0.70710796}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 7.6183, y: 7.6183, z: 7.6183}
m_Children: []
m_Father: {fileID: 8292977142823461081}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 90.00001, y: 0, z: 0}
--- !u!33 &7088160373850904865
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3797021628422937969}
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &7234933202352670106
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3797021628422937969}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 216d1ef0b5d0e3e4dac420dc9406e3d9, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!64 &6378984856010298829
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3797021628422937969}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0}
--- !u!114 &7309519380391567729
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3797021628422937969}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d32a8fe07c5601c4aafeb8c69edeff7c, type: 3}
m_Name:
m_EditorClassIdentifier:
NearScalingDistance: 550
FarScalingDistance: 550
FixPlanetSize: 2
--- !u!1 &8292977142823461082
GameObject:
m_ObjectHideFlags: 0
@ -25,10 +135,11 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8292977142823461082}
m_LocalRotation: {x: -0, y: 0.70710677, z: -0, w: 0.7071068}
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.70710677}
m_LocalPosition: {x: 0, y: 13, z: -152}
m_LocalScale: {x: 15.336881, y: 15.336881, z: 15.336881}
m_Children: []
m_Children:
- {fileID: 583456351474062817}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 90.00001, z: 0}
@ -46,7 +157,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
unitIconPrefab: {fileID: 3490316418910827002, guid: 823be9508eb6c31478f39dff23361625,
type: 3}
unitIcon: {fileID: 0}
fleetIcon: {fileID: 3797021628422937969}
movementSpeed: 150
sprite: {fileID: 21300000, guid: a725f0b3a4d26a945a5b8ccbcffef516, type: 3}
--- !u!114 &-4037000077425190141


+ 172
- 20
Assets/GWConquest/Scenes/GalaxyMap.unity View File

@ -10029,6 +10029,52 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 423864850}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &426309782
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 426309784}
- component: {fileID: 426309783}
m_Layer: 0
m_Name: GameManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &426309783
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 426309782}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 1b9220863ccc39c4fb21b86b6156cd7c, type: 3}
m_Name:
m_EditorClassIdentifier:
PlayerColors:
- {r: 1, g: 0.8901961, b: 0.5647059, a: 1}
- {r: 0.8, g: 0.25490198, b: 0.14509805, a: 1}
--- !u!4 &426309784
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
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_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &439458478
GameObject:
m_ObjectHideFlags: 0
@ -10835,7 +10881,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452000, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: m_Name
value: cunt
value: Karth
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -10846,7 +10892,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: planetName
value: cunt
value: Karth
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -18803,6 +18849,7 @@ Transform:
- {fileID: 528383328}
- {fileID: 1613302959}
- {fileID: 7718295}
- {fileID: 1985410692}
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -19503,7 +19550,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452000, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: m_Name
value: sinnvoll
value: Garsomyr
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -19514,7 +19561,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: planetName
value: sinnvoll
value: Garsomyr
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -20120,12 +20167,12 @@ PrefabInstance:
- target: {fileID: 5208040857522702121, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_Positions.Array.data[0].x
value: -5320
value: -5436
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702121, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_Positions.Array.data[0].z
value: 2692
value: 2619
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702121, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
@ -22070,7 +22117,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452000, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: m_Name
value: Kant Kant KANT
value: Varr
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -22081,7 +22128,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: planetName
value: Kant Kant KANT
value: Varr
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -27885,7 +27932,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452000, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: m_Name
value: Feeef
value: Harkon
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -27896,7 +27943,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: planetName
value: Feeef
value: Harkon
objectReference: {fileID: 0}
- target: {fileID: 4678135251355824059, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -31311,7 +31358,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452000, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: m_Name
value: shithole
value: Ingrim
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -31322,7 +31369,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: planetName
value: shithole
value: Ingrim
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -33968,7 +34015,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452000, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: m_Name
value: Kant Kant KANT (2)
value: Sikharas
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -33979,7 +34026,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: planetName
value: Kant Kant KANT
value: Sikharas
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -36052,7 +36099,7 @@ PrefabInstance:
- target: {fileID: 4678135251219451999, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: m_LocalPosition.x
value: -5320
value: -5436
objectReference: {fileID: 0}
- target: {fileID: 4678135251219451999, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -36062,7 +36109,7 @@ PrefabInstance:
- target: {fileID: 4678135251219451999, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: m_LocalPosition.z
value: 2692
value: 2619
objectReference: {fileID: 0}
- target: {fileID: 4678135251219451999, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -37898,7 +37945,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452000, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: m_Name
value: Kant Kant KANT (1)
value: Ehrlen
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -37909,7 +37956,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: planetName
value: Kant Kant KANT
value: Ehrlen
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -39628,7 +39675,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452000, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: m_Name
value: Weyland
value: Weylan
objectReference: {fileID: 0}
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -39639,7 +39686,7 @@ PrefabInstance:
- target: {fileID: 4678135251219452001, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
propertyPath: planetName
value: Weyland
value: Weylan
objectReference: {fileID: 0}
- target: {fileID: 4678135251355824059, guid: 9ae35d7f911b63f4f95f432141dd5746,
type: 3}
@ -39945,6 +39992,111 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1978818102}
m_CullTransparentMesh: 0
--- !u!1001 &1985410691
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 850140851}
m_Modifications:
- target: {fileID: 526244009083771565, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: planet1
value:
objectReference: {fileID: 1810618284}
- target: {fileID: 526244009083771565, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: planet2
value:
objectReference: {fileID: 1271054494}
- target: {fileID: 5208040857522702120, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_Name
value: PlanetConnection
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702121, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_Positions.Array.data[0].x
value: -5436
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702121, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_Positions.Array.data[0].z
value: 2619
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702121, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_Positions.Array.data[1].x
value: -5545
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702121, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_Positions.Array.data[1].z
value: 1720
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_RootOrder
value: 116
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d65f827586fd5c04e9caf7f4ff7338e6, type: 3}
--- !u!4 &1985410692 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 5208040857522702122, guid: d65f827586fd5c04e9caf7f4ff7338e6,
type: 3}
m_PrefabInstance: {fileID: 1985410691}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1986334062
GameObject:
m_ObjectHideFlags: 0


+ 54
- 0
Assets/GWConquest/Scripts/DragDropElement.cs View File

@ -0,0 +1,54 @@
using UnityEngine;
namespace GWConquest
{
[RequireComponent(typeof(RectTransform))]
public class DragDropElement : MonoBehaviour
{
private bool isDragging = false;
private Vector3 origPosition;
private Vector3 mouseOffset;
public RectTransform rectTransform
{
get => GetComponent<RectTransform>();
}
private void Update()
{
if(!isDragging & Input.GetButtonDown("Left Click"))
{
Vector3 mousePos = Input.mousePosition;
if(RectTransformUtility.RectangleContainsScreenPoint(rectTransform, mousePos))
{
BoltLog.Info("Started dragging");
isDragging = true;
origPosition = rectTransform.localPosition;
mouseOffset = rectTransform.position - mousePos;
}
}
if(isDragging)
{
Vector3 mousePos = Input.mousePosition;
rectTransform.position = mousePos + mouseOffset;
if (Input.GetButtonUp("Left Click"))
{
isDragging = false;
if(OnDragFinished())
{
rectTransform.localPosition = origPosition;
}
}
}
}
public virtual bool OnDragFinished()
{
return false;
}
}
}

+ 11
- 0
Assets/GWConquest/Scripts/DragDropElement.cs.meta View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 853e430ea4274f84a9c2f2bdb12b29e4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 1
- 1
Assets/GWConquest/Scripts/FleetPanelUI.cs View File

@ -45,7 +45,7 @@ namespace GWConquest
ui.SetFormation(formations[i]);
formationUIList.Add(ui);
yPos += rt.sizeDelta.y;
yPos -= rt.sizeDelta.y;
}
}


+ 7
- 21
Assets/GWConquest/Scripts/Formation.cs View File

@ -62,7 +62,7 @@ namespace GWConquest
get => Array.ConvertAll(UnitEntities.ToArray(), e => e.GetComponent<Unit>());
}
public GameObject unitIcon;
public GameObject fleetIcon;
public float movementSpeed = 1f;
public Sprite sprite;
@ -102,9 +102,11 @@ namespace GWConquest
}
}
private void OnTransitBegun()
private void OnTransitStateChanged()
{
animDistanceCovered = 0;
fleetIcon.SetActive(state.IsInTransit);
fleetIcon.GetComponent<Renderer>().material.color = Player.state.PlayerColor;
}
public override void SimulateOwner()
@ -147,24 +149,6 @@ namespace GWConquest
private void Update()
{
if(unitIcon != null)
{
RectTransform rt = unitIcon.GetComponent<RectTransform>();
RectTransform canvasTransfrom = rt.parent as RectTransform;
Vector2 screenSize = canvasTransfrom.rect.size;
Camera cam = Camera.main;
Vector3 camPoint = cam.WorldToViewportPoint(transform.position);
if(camPoint.z > 0)
{
rt.anchoredPosition = new Vector2(camPoint.x, camPoint.y) * screenSize;
unitIcon.SetActive(true);
}
else
{
unitIcon.SetActive(false);
}
}
//Debug.LogFormat("Current state: IsInTransit {0}; CurrentZone {1}; CoveredDistance {2}", state.IsInTransit, state.CurrentZone, CoveredDistance);
if (state.IsInTransit)
@ -176,6 +160,8 @@ namespace GWConquest
targetZone.transform.position,
animDistanceCovered / state.CurrentTransition.TransitionLength);
transform.position = newPos;
transform.rotation = Quaternion.FromToRotation(Vector3.forward,
targetZone.transform.position - originZone.transform.position);
}
else if(currentZone != null)
@ -197,7 +183,7 @@ namespace GWConquest
}
state.AddCallback("IsInTransit", OnTransitBegun);
state.AddCallback("IsInTransit", OnTransitStateChanged);
state.AddCallback("CurrentZone", OnZoneChanged);
}


+ 20
- 1
Assets/GWConquest/Scripts/FormationUI.cs View File

@ -1,10 +1,11 @@
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
namespace GWConquest
{
public class FormationUI : MonoBehaviour
public class FormationUI : DragDropElement
{
public Text FormationNameText;
public GameObject UnitPanelPrefab;
@ -69,5 +70,23 @@ namespace GWConquest
GetComponent<RectTransform>().sizeDelta = new Vector2(0, (unitPanels.Count + 1) * UnitPanelHeight);
}
public override bool OnDragFinished()
{
PhysicsRaycaster pr = FindObjectOfType<PhysicsRaycaster>();
List<RaycastResult> list = pr.RaycastFromMousePosition();
foreach (RaycastResult result in list)
{
Planet planet = result.gameObject.GetComponentInParent<Planet>();
if (planet != null)
{
formation.TryMoveToPlanet(planet);
BoltLog.Info("Moving formation {0} to planet {1}", formation.name, planet.name);
break;
}
}
return true;
}
}
}

+ 8
- 0
Assets/GWConquest/Scripts/GalaxyMapUI.cs View File

@ -44,6 +44,14 @@ namespace GWConquest
UpdateIndicator();
SelectedPlanet.FormationsChanged += PlanetFormationsChanged;
if(PlayerFleetPanel.activeSelf)
{
ShowPlayerFleetPanel();
}
if (EnemyFleetPanel.activeSelf)
{
ShowEnemyFleetPanel();
}
}
else
{


+ 22
- 0
Assets/GWConquest/Scripts/GameManager.cs View File

@ -0,0 +1,22 @@
using UnityEngine;
namespace GWConquest
{
public class GameManager : MonoBehaviour
{
public Color[] PlayerColors;
private static GameManager _instance;
public static GameManager Instance
{
get {
if(_instance == null)
{
_instance = FindObjectOfType<GameManager>();
}
return _instance;
}
}
}
}

+ 11
- 0
Assets/GWConquest/Scripts/GameManager.cs.meta View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1b9220863ccc39c4fb21b86b6156cd7c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

+ 1
- 1
Assets/GWConquest/Scripts/MainMenu.cs View File

@ -25,7 +25,7 @@ namespace GWConquest
BoltMatchmaking.CreateSession(
sessionID: matchName,
sceneToLoad: "GalaxyMapTest"
sceneToLoad: "GalaxyMap"
);
}
}


+ 7
- 0
Assets/GWConquest/Scripts/Player.cs View File

@ -13,6 +13,13 @@ namespace GWConquest
public override void Attached()
{
PlayerList.Add(this);
if(entity.IsOwner)
{
state.PlayerId = PlayerList.IndexOf(this);
GameManager gm = GameManager.Instance;
int color = state.PlayerId % gm.PlayerColors.Length;
state.PlayerColor = gm.PlayerColors[color];
}
}
public override void Detached()


+ 8
- 0
Assets/GWConquest/Textures/Icons/Materials.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0a5f9719b0f2668489455eeeaf32e535
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

+ 84
- 0
Assets/GWConquest/Textures/Icons/Materials/Fleet Moving.mat View File

@ -0,0 +1,84 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Fleet Moving
m_Shader: {fileID: 10760, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords: _ALPHABLEND_ON
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 2800000, guid: c8bacffa6bf2fcf4fb152f1deb401b25, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _ColorMask: 15
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 10
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 2
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 5
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _UVSec: 0
- _UseUIAlphaClip: 0
- _ZWrite: 0
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

+ 8
- 0
Assets/GWConquest/Textures/Icons/Materials/Fleet Moving.mat.meta View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 216d1ef0b5d0e3e4dac420dc9406e3d9
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/Photon/PhotonBolt/assemblies/bolt.user.dll View File


BIN
Assets/Photon/PhotonBolt/assemblies/bolt.user.dll.mdb View File


+ 35
- 0
Assets/Photon/PhotonBolt/project.json View File

@ -289,6 +289,41 @@
"ExtrapolationMaxFrames": 9,
"SnapMagnitude": 10.0
}
},
{
"Name": "PlayerColor",
"Enabled": true,
"Expanded": true,
"ReplicationMode": 1,
"Priority": 1,
"PropertyType": {
"$type": "Bolt.Compiler.PropertyTypeColor, bolt.compiler"
},
"AssetSettings": {
"$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler",
"ExtrapolationErrorTolerance": 0.25,
"_ExtrapolationCorrectionFrames": 6,
"ExtrapolationMaxFrames": 9,
"SnapMagnitude": 10.0
}
},
{
"Name": "PlayerId",
"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,


+ 3
- 3
ProjectSettings/EditorBuildSettings.asset View File

@ -8,10 +8,10 @@ EditorBuildSettings:
- enabled: 1
path: Assets/GWConquest/Scenes/MainMenu.unity
guid: eafb803ea59042b4eb54281fbfbb1bd6
- enabled: 1
path: Assets/GWConquest/Scenes/GalaxyMapTest.unity
guid: b4406a1d42081034781f31c28e7402ad
- enabled: 1
path: Assets/GWConquest/Scenes/GalaxyMap.unity
guid: 9f36bfc6cf7983247a4db014bed21e46
- enabled: 0
path: Assets/GWConquest/Scenes/GalaxyMapTest.unity
guid: b4406a1d42081034781f31c28e7402ad
m_configObjects: {}

Loading…
Cancel
Save