Browse Source

Working Game

master
NekuSoul 2 years ago
parent
commit
2f4ef703f2

+ 21
- 0
Assets/Game/Code/Structs.cs View File

@@ -0,0 +1,21 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+
6
+namespace Assets.Game.Code
7
+{
8
+    public struct TileInfo
9
+    {
10
+        public int X;
11
+        public int Y;
12
+        public Tile Type;
13
+
14
+        public TileInfo(int x, int y, Tile type)
15
+        {
16
+            X = x;
17
+            Y = y;
18
+            Type = type;
19
+        }
20
+    }
21
+}

+ 12
- 0
Assets/Game/Code/Structs.cs.meta View File

@@ -0,0 +1,12 @@
1
+fileFormatVersion: 2
2
+guid: 6b47833e72b3a2a498f54bfb8965784b
3
+timeCreated: 1492972515
4
+licenseType: Free
5
+MonoImporter:
6
+  serializedVersion: 2
7
+  defaultReferences: []
8
+  executionOrder: 0
9
+  icon: {instanceID: 0}
10
+  userData: 
11
+  assetBundleName: 
12
+  assetBundleVariant: 

+ 26
- 0
Assets/Game/Prefabs/CityTile.prefab View File

@@ -20,6 +20,7 @@ GameObject:
20 20
   m_Component:
21 21
   - component: {fileID: 4724328765554262}
22 22
   - component: {fileID: 212843144731279788}
23
+  - component: {fileID: 61845238110141360}
23 24
   m_Layer: 0
24 25
   m_Name: CityTile
25 26
   m_TagString: Untagged
@@ -40,6 +41,31 @@ Transform:
40 41
   m_Father: {fileID: 0}
41 42
   m_RootOrder: 0
42 43
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44
+--- !u!61 &61845238110141360
45
+BoxCollider2D:
46
+  m_ObjectHideFlags: 1
47
+  m_PrefabParentObject: {fileID: 0}
48
+  m_PrefabInternal: {fileID: 100100000}
49
+  m_GameObject: {fileID: 1262761287866216}
50
+  m_Enabled: 1
51
+  m_Density: 1
52
+  m_Material: {fileID: 0}
53
+  m_IsTrigger: 0
54
+  m_UsedByEffector: 0
55
+  m_UsedByComposite: 0
56
+  m_Offset: {x: 0, y: 0}
57
+  m_SpriteTilingProperty:
58
+    border: {x: 0, y: 0, z: 0, w: 0}
59
+    pivot: {x: 0.5, y: 0.5}
60
+    oldSize: {x: 1, y: 1}
61
+    newSize: {x: 1, y: 1}
62
+    adaptiveTilingThreshold: 0.5
63
+    drawMode: 0
64
+    adaptiveTiling: 0
65
+  m_AutoTiling: 0
66
+  serializedVersion: 2
67
+  m_Size: {x: 1, y: 1}
68
+  m_EdgeRadius: 0
43 69
 --- !u!212 &212843144731279788
44 70
 SpriteRenderer:
45 71
   m_ObjectHideFlags: 1

+ 26
- 0
Assets/Game/Prefabs/DesertCityTile.prefab View File

@@ -20,6 +20,7 @@ GameObject:
20 20
   m_Component:
21 21
   - component: {fileID: 4291697649564274}
22 22
   - component: {fileID: 212648272571921890}
23
+  - component: {fileID: 61336085849536836}
23 24
   m_Layer: 0
24 25
   m_Name: DesertCityTile
25 26
   m_TagString: Untagged
@@ -40,6 +41,31 @@ Transform:
40 41
   m_Father: {fileID: 0}
41 42
   m_RootOrder: 0
42 43
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44
+--- !u!61 &61336085849536836
45
+BoxCollider2D:
46
+  m_ObjectHideFlags: 1
47
+  m_PrefabParentObject: {fileID: 0}
48
+  m_PrefabInternal: {fileID: 100100000}
49
+  m_GameObject: {fileID: 1648549541328128}
50
+  m_Enabled: 1
51
+  m_Density: 1
52
+  m_Material: {fileID: 0}
53
+  m_IsTrigger: 0
54
+  m_UsedByEffector: 0
55
+  m_UsedByComposite: 0
56
+  m_Offset: {x: 0, y: 0}
57
+  m_SpriteTilingProperty:
58
+    border: {x: 0, y: 0, z: 0, w: 0}
59
+    pivot: {x: 0.5, y: 0.5}
60
+    oldSize: {x: 1, y: 1}
61
+    newSize: {x: 1, y: 1}
62
+    adaptiveTilingThreshold: 0.5
63
+    drawMode: 0
64
+    adaptiveTiling: 0
65
+  m_AutoTiling: 0
66
+  serializedVersion: 2
67
+  m_Size: {x: 1, y: 1}
68
+  m_EdgeRadius: 0
43 69
 --- !u!212 &212648272571921890
44 70
 SpriteRenderer:
45 71
   m_ObjectHideFlags: 1

+ 26
- 0
Assets/Game/Prefabs/DesertTile.prefab View File

@@ -20,6 +20,7 @@ GameObject:
20 20
   m_Component:
21 21
   - component: {fileID: 4041333312303838}
22 22
   - component: {fileID: 212965468822084368}
23
+  - component: {fileID: 61041717363648342}
23 24
   m_Layer: 0
24 25
   m_Name: DesertTile
25 26
   m_TagString: Untagged
@@ -40,6 +41,31 @@ Transform:
40 41
   m_Father: {fileID: 0}
41 42
   m_RootOrder: 0
42 43
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44
+--- !u!61 &61041717363648342
45
+BoxCollider2D:
46
+  m_ObjectHideFlags: 1
47
+  m_PrefabParentObject: {fileID: 0}
48
+  m_PrefabInternal: {fileID: 100100000}
49
+  m_GameObject: {fileID: 1618135972120210}
50
+  m_Enabled: 1
51
+  m_Density: 1
52
+  m_Material: {fileID: 0}
53
+  m_IsTrigger: 0
54
+  m_UsedByEffector: 0
55
+  m_UsedByComposite: 0
56
+  m_Offset: {x: 0, y: 0}
57
+  m_SpriteTilingProperty:
58
+    border: {x: 0, y: 0, z: 0, w: 0}
59
+    pivot: {x: 0.5, y: 0.5}
60
+    oldSize: {x: 1, y: 1}
61
+    newSize: {x: 1, y: 1}
62
+    adaptiveTilingThreshold: 0.5
63
+    drawMode: 0
64
+    adaptiveTiling: 0
65
+  m_AutoTiling: 0
66
+  serializedVersion: 2
67
+  m_Size: {x: 1, y: 1}
68
+  m_EdgeRadius: 0
43 69
 --- !u!212 &212965468822084368
44 70
 SpriteRenderer:
45 71
   m_ObjectHideFlags: 1

+ 26
- 0
Assets/Game/Prefabs/DesertVillageTile.prefab View File

@@ -20,6 +20,7 @@ GameObject:
20 20
   m_Component:
21 21
   - component: {fileID: 4483080115355672}
22 22
   - component: {fileID: 212120866055457942}
23
+  - component: {fileID: 61326776146001108}
23 24
   m_Layer: 0
24 25
   m_Name: DesertVillageTile
25 26
   m_TagString: Untagged
@@ -40,6 +41,31 @@ Transform:
40 41
   m_Father: {fileID: 0}
41 42
   m_RootOrder: 0
42 43
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44
+--- !u!61 &61326776146001108
45
+BoxCollider2D:
46
+  m_ObjectHideFlags: 1
47
+  m_PrefabParentObject: {fileID: 0}
48
+  m_PrefabInternal: {fileID: 100100000}
49
+  m_GameObject: {fileID: 1838802303256830}
50
+  m_Enabled: 1
51
+  m_Density: 1
52
+  m_Material: {fileID: 0}
53
+  m_IsTrigger: 0
54
+  m_UsedByEffector: 0
55
+  m_UsedByComposite: 0
56
+  m_Offset: {x: 0, y: 0}
57
+  m_SpriteTilingProperty:
58
+    border: {x: 0, y: 0, z: 0, w: 0}
59
+    pivot: {x: 0.5, y: 0.5}
60
+    oldSize: {x: 1, y: 1}
61
+    newSize: {x: 1, y: 1}
62
+    adaptiveTilingThreshold: 0.5
63
+    drawMode: 0
64
+    adaptiveTiling: 0
65
+  m_AutoTiling: 0
66
+  serializedVersion: 2
67
+  m_Size: {x: 1, y: 1}
68
+  m_EdgeRadius: 0
43 69
 --- !u!212 &212120866055457942
44 70
 SpriteRenderer:
45 71
   m_ObjectHideFlags: 1

+ 26
- 0
Assets/Game/Prefabs/ForestTile.prefab View File

@@ -20,6 +20,7 @@ GameObject:
20 20
   m_Component:
21 21
   - component: {fileID: 4519573174188228}
22 22
   - component: {fileID: 212774585545612086}
23
+  - component: {fileID: 61793336744880398}
23 24
   m_Layer: 0
24 25
   m_Name: ForestTile
25 26
   m_TagString: Untagged
@@ -40,6 +41,31 @@ Transform:
40 41
   m_Father: {fileID: 0}
41 42
   m_RootOrder: 0
42 43
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44
+--- !u!61 &61793336744880398
45
+BoxCollider2D:
46
+  m_ObjectHideFlags: 1
47
+  m_PrefabParentObject: {fileID: 0}
48
+  m_PrefabInternal: {fileID: 100100000}
49
+  m_GameObject: {fileID: 1397914446255380}
50
+  m_Enabled: 1
51
+  m_Density: 1
52
+  m_Material: {fileID: 0}
53
+  m_IsTrigger: 0
54
+  m_UsedByEffector: 0
55
+  m_UsedByComposite: 0
56
+  m_Offset: {x: 0, y: 0}
57
+  m_SpriteTilingProperty:
58
+    border: {x: 0, y: 0, z: 0, w: 0}
59
+    pivot: {x: 0.5, y: 0.5}
60
+    oldSize: {x: 1, y: 1}
61
+    newSize: {x: 1, y: 1}
62
+    adaptiveTilingThreshold: 0.5
63
+    drawMode: 0
64
+    adaptiveTiling: 0
65
+  m_AutoTiling: 0
66
+  serializedVersion: 2
67
+  m_Size: {x: 1, y: 1}
68
+  m_EdgeRadius: 0
43 69
 --- !u!212 &212774585545612086
44 70
 SpriteRenderer:
45 71
   m_ObjectHideFlags: 1

+ 26
- 0
Assets/Game/Prefabs/MountainForestTile.prefab View File

@@ -20,6 +20,7 @@ GameObject:
20 20
   m_Component:
21 21
   - component: {fileID: 4012032435134654}
22 22
   - component: {fileID: 212592072658519980}
23
+  - component: {fileID: 61955083902673854}
23 24
   m_Layer: 0
24 25
   m_Name: MountainForestTile
25 26
   m_TagString: Untagged
@@ -40,6 +41,31 @@ Transform:
40 41
   m_Father: {fileID: 0}
41 42
   m_RootOrder: 0
42 43
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44
+--- !u!61 &61955083902673854
45
+BoxCollider2D:
46
+  m_ObjectHideFlags: 1
47
+  m_PrefabParentObject: {fileID: 0}
48
+  m_PrefabInternal: {fileID: 100100000}
49
+  m_GameObject: {fileID: 1633848307606610}
50
+  m_Enabled: 1
51
+  m_Density: 1
52
+  m_Material: {fileID: 0}
53
+  m_IsTrigger: 0
54
+  m_UsedByEffector: 0
55
+  m_UsedByComposite: 0
56
+  m_Offset: {x: 0, y: 0}
57
+  m_SpriteTilingProperty:
58
+    border: {x: 0, y: 0, z: 0, w: 0}
59
+    pivot: {x: 0.5, y: 0.5}
60
+    oldSize: {x: 1, y: 1}
61
+    newSize: {x: 1, y: 1}
62
+    adaptiveTilingThreshold: 0.5
63
+    drawMode: 0
64
+    adaptiveTiling: 0
65
+  m_AutoTiling: 0
66
+  serializedVersion: 2
67
+  m_Size: {x: 1, y: 1}
68
+  m_EdgeRadius: 0
43 69
 --- !u!212 &212592072658519980
44 70
 SpriteRenderer:
45 71
   m_ObjectHideFlags: 1

+ 26
- 0
Assets/Game/Prefabs/MountainTile.prefab View File

@@ -20,6 +20,7 @@ GameObject:
20 20
   m_Component:
21 21
   - component: {fileID: 4376169457326906}
22 22
   - component: {fileID: 212855576515540000}
23
+  - component: {fileID: 61772176579661912}
23 24
   m_Layer: 0
24 25
   m_Name: MountainTile
25 26
   m_TagString: Untagged
@@ -40,6 +41,31 @@ Transform:
40 41
   m_Father: {fileID: 0}
41 42
   m_RootOrder: 0
42 43
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44
+--- !u!61 &61772176579661912
45
+BoxCollider2D:
46
+  m_ObjectHideFlags: 1
47
+  m_PrefabParentObject: {fileID: 0}
48
+  m_PrefabInternal: {fileID: 100100000}
49
+  m_GameObject: {fileID: 1778166722623412}
50
+  m_Enabled: 1
51
+  m_Density: 1
52
+  m_Material: {fileID: 0}
53
+  m_IsTrigger: 0
54
+  m_UsedByEffector: 0
55
+  m_UsedByComposite: 0
56
+  m_Offset: {x: 0, y: 0}
57
+  m_SpriteTilingProperty:
58
+    border: {x: 0, y: 0, z: 0, w: 0}
59
+    pivot: {x: 0.5, y: 0.5}
60
+    oldSize: {x: 1, y: 1}
61
+    newSize: {x: 1, y: 1}
62
+    adaptiveTilingThreshold: 0.5
63
+    drawMode: 0
64
+    adaptiveTiling: 0
65
+  m_AutoTiling: 0
66
+  serializedVersion: 2
67
+  m_Size: {x: 1, y: 1}
68
+  m_EdgeRadius: 0
43 69
 --- !u!212 &212855576515540000
44 70
 SpriteRenderer:
45 71
   m_ObjectHideFlags: 1

+ 26
- 0
Assets/Game/Prefabs/PlainTile.prefab View File

@@ -20,6 +20,7 @@ GameObject:
20 20
   m_Component:
21 21
   - component: {fileID: 4476343760838216}
22 22
   - component: {fileID: 212394121054313448}
23
+  - component: {fileID: 61847378489625778}
23 24
   m_Layer: 0
24 25
   m_Name: PlainTile
25 26
   m_TagString: Untagged
@@ -40,6 +41,31 @@ Transform:
40 41
   m_Father: {fileID: 0}
41 42
   m_RootOrder: 0
42 43
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44
+--- !u!61 &61847378489625778
45
+BoxCollider2D:
46
+  m_ObjectHideFlags: 1
47
+  m_PrefabParentObject: {fileID: 0}
48
+  m_PrefabInternal: {fileID: 100100000}
49
+  m_GameObject: {fileID: 1297315552155284}
50
+  m_Enabled: 1
51
+  m_Density: 1
52
+  m_Material: {fileID: 0}
53
+  m_IsTrigger: 0
54
+  m_UsedByEffector: 0
55
+  m_UsedByComposite: 0
56
+  m_Offset: {x: 0, y: 0}
57
+  m_SpriteTilingProperty:
58
+    border: {x: 0, y: 0, z: 0, w: 0}
59
+    pivot: {x: 0.5, y: 0.5}
60
+    oldSize: {x: 1, y: 1}
61
+    newSize: {x: 1, y: 1}
62
+    adaptiveTilingThreshold: 0.5
63
+    drawMode: 0
64
+    adaptiveTiling: 0
65
+  m_AutoTiling: 0
66
+  serializedVersion: 2
67
+  m_Size: {x: 1, y: 1}
68
+  m_EdgeRadius: 0
43 69
 --- !u!212 &212394121054313448
44 70
 SpriteRenderer:
45 71
   m_ObjectHideFlags: 1

+ 26
- 0
Assets/Game/Prefabs/VillageTile.prefab View File

@@ -20,6 +20,7 @@ GameObject:
20 20
   m_Component:
21 21
   - component: {fileID: 4770981213103908}
22 22
   - component: {fileID: 212857386645024732}
23
+  - component: {fileID: 61160770526667852}
23 24
   m_Layer: 0
24 25
   m_Name: VillageTile
25 26
   m_TagString: Untagged
@@ -40,6 +41,31 @@ Transform:
40 41
   m_Father: {fileID: 0}
41 42
   m_RootOrder: 0
42 43
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44
+--- !u!61 &61160770526667852
45
+BoxCollider2D:
46
+  m_ObjectHideFlags: 1
47
+  m_PrefabParentObject: {fileID: 0}
48
+  m_PrefabInternal: {fileID: 100100000}
49
+  m_GameObject: {fileID: 1547830048444908}
50
+  m_Enabled: 1
51
+  m_Density: 1
52
+  m_Material: {fileID: 0}
53
+  m_IsTrigger: 0
54
+  m_UsedByEffector: 0
55
+  m_UsedByComposite: 0
56
+  m_Offset: {x: 0, y: 0}
57
+  m_SpriteTilingProperty:
58
+    border: {x: 0, y: 0, z: 0, w: 0}
59
+    pivot: {x: 0.5, y: 0.5}
60
+    oldSize: {x: 1, y: 1}
61
+    newSize: {x: 1, y: 1}
62
+    adaptiveTilingThreshold: 0.5
63
+    drawMode: 0
64
+    adaptiveTiling: 0
65
+  m_AutoTiling: 0
66
+  serializedVersion: 2
67
+  m_Size: {x: 1, y: 1}
68
+  m_EdgeRadius: 0
43 69
 --- !u!212 &212857386645024732
44 70
 SpriteRenderer:
45 71
   m_ObjectHideFlags: 1

+ 27
- 1
Assets/Game/Prefabs/WaterTile.prefab View File

@@ -20,6 +20,7 @@ GameObject:
20 20
   m_Component:
21 21
   - component: {fileID: 4072486249488894}
22 22
   - component: {fileID: 212432159520600780}
23
+  - component: {fileID: 61888317446948938}
23 24
   m_Layer: 0
24 25
   m_Name: WaterTile
25 26
   m_TagString: Untagged
@@ -34,12 +35,37 @@ Transform:
34 35
   m_PrefabInternal: {fileID: 100100000}
35 36
   m_GameObject: {fileID: 1231320123221416}
36 37
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
37
-  m_LocalPosition: {x: 0, y: 0, z: 0}
38
+  m_LocalPosition: {x: -16.507936, y: -11.379257, z: 1}
38 39
   m_LocalScale: {x: 1, y: 1, z: 1}
39 40
   m_Children: []
40 41
   m_Father: {fileID: 0}
41 42
   m_RootOrder: 0
42 43
   m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
44
+--- !u!61 &61888317446948938
45
+BoxCollider2D:
46
+  m_ObjectHideFlags: 1
47
+  m_PrefabParentObject: {fileID: 0}
48
+  m_PrefabInternal: {fileID: 100100000}
49
+  m_GameObject: {fileID: 1231320123221416}
50
+  m_Enabled: 1
51
+  m_Density: 1
52
+  m_Material: {fileID: 0}
53
+  m_IsTrigger: 0
54
+  m_UsedByEffector: 0
55
+  m_UsedByComposite: 0
56
+  m_Offset: {x: 0, y: 0}
57
+  m_SpriteTilingProperty:
58
+    border: {x: 0, y: 0, z: 0, w: 0}
59
+    pivot: {x: 0.5, y: 0.5}
60
+    oldSize: {x: 1, y: 1}
61
+    newSize: {x: 1, y: 1}
62
+    adaptiveTilingThreshold: 0.5
63
+    drawMode: 0
64
+    adaptiveTiling: 0
65
+  m_AutoTiling: 0
66
+  serializedVersion: 2
67
+  m_Size: {x: 1, y: 1}
68
+  m_EdgeRadius: 0
43 69
 --- !u!212 &212432159520600780
44 70
 SpriteRenderer:
45 71
   m_ObjectHideFlags: 1

+ 4321
- 351
Assets/Game/Scenes/MainScene.unity
File diff suppressed because it is too large
View File


+ 256
- 7
Assets/Game/Scripts/GameManager.cs View File

@@ -1,4 +1,6 @@
1
-using Assets.Game.Code;
1
+using System;
2
+using System.Collections;
3
+using Assets.Game.Code;
2 4
 using UnityEngine;
3 5
 using UnityEngine.UI;
4 6
 
@@ -6,32 +8,279 @@ namespace Assets.Game.Scripts
6 8
 {
7 9
     public class GameManager : MonoBehaviour
8 10
     {
9
-        public Level Level;
11
+        public Level[] Level;
12
+        public Camera Camera;
13
+        public TileManager TileManager;
14
+
15
+        public AnimationCurve BarCurve;
16
+        public AnimationCurve CameraCurve;
17
+
18
+        public Image PercentageImage;
19
+        public Image ForestPercentageImage;
10 20
         public Text ForestCountText;
11 21
         public Text CityCountText;
12 22
 
23
+        public Button PlayButton;
24
+        public Sprite PlaySprite;
25
+        public Sprite PauseSprite;
26
+
27
+        public Button WaterButton;
28
+        public Button PlainButton;
29
+        public Button MountainButton;
30
+        public Button DesertButton;
31
+        public Button ForestButton;
32
+        public Button VillageButton;
33
+        public Button CityButton;
34
+
35
+        private Tile? _selectedTile;
36
+
37
+        public float PlaySpeed = 1;
38
+
39
+        private bool _isPlaying;
40
+        private bool _inProgress;
41
+        private float _nextAdvance;
42
+
43
+        private int _solvedLevel;
44
+        private Level _currentLevel;
45
+        private GameObject _tileCursor;
46
+
47
+        //private Vector3 _cameraFrom;
48
+        //private Vector3 _cameraTo;
49
+        //private float _cameraAnimationTime;
50
+
13 51
         // Use this for initialization
14 52
         public void Start()
15 53
         {
16
-            Level.LoadLevel();
54
+            _currentLevel = Level[0];
55
+            StartCoroutine(ChangeCameraPosition(Level[_solvedLevel].transform.position, Level[_solvedLevel].transform.position));
56
+            Reset();
17 57
         }
18 58
 
19 59
         // Update is called once per frame
20 60
         public void Update()
21 61
         {
62
+            if (_selectedTile.HasValue)
63
+            {
64
+                Vector2 pos = Camera.ScreenToWorldPoint(Input.mousePosition);
65
+                _tileCursor.transform.position = new Vector3(pos.x, pos.y, 0);
66
+
67
+                if (Input.GetMouseButtonDown(0))
68
+                {
69
+                    Collider2D col = Physics2D.OverlapPoint(pos);
70
+
71
+                    if (col != null)
72
+                    {
73
+                        TileInfo? info = _currentLevel.GetTileFromObject(col.gameObject);
22 74
 
75
+                        if (info.HasValue)
76
+                        {
77
+                            if (info.Value.Type != _selectedTile.Value)
78
+                            {
79
+                                _currentLevel.ApplyTile(info.Value.X, info.Value.Y, _selectedTile.Value);
80
+                                switch (_selectedTile)
81
+                                {
82
+                                    case Tile.Water:
83
+                                        _currentLevel.CurrentWaterTiles--;
84
+                                        break;
85
+                                    case Tile.Plain:
86
+                                        _currentLevel.CurrentPlainTiles--;
87
+                                        break;
88
+                                    case Tile.Mountain:
89
+                                        _currentLevel.CurrentMountainTiles--;
90
+                                        break;
91
+                                    case Tile.Desert:
92
+                                        _currentLevel.CurrentDesertTiles--;
93
+                                        break;
94
+                                    case Tile.Forest:
95
+                                        _currentLevel.CurrentForestTiles--;
96
+                                        break;
97
+                                    case Tile.Village:
98
+                                        _currentLevel.CurrentVillageTiles--;
99
+                                        break;
100
+                                    case Tile.City:
101
+                                        _currentLevel.CurrentCityTiles--;
102
+                                        break;
103
+                                }
104
+                                UpdateResourceBar();
105
+                                Destroy(_tileCursor);
106
+                                _selectedTile = null;
107
+                                _tileCursor = null;
108
+                            }
109
+                        }
110
+                    }
111
+                }
112
+            }
113
+
114
+            if (_isPlaying)
115
+            {
116
+                if (_nextAdvance < 0)
117
+                {
118
+                    bool change = _currentLevel.AdvanceStep();
119
+                    UpdatePercentage();
120
+                    _nextAdvance = PlaySpeed;
121
+                    if (!change)
122
+                    {
123
+                        _isPlaying = false;
124
+                        if (_currentLevel.ForestCount == _currentLevel.CityCount && _solvedLevel < 9)
125
+                        {
126
+                            _solvedLevel++;
127
+                            _currentLevel = Level[_solvedLevel];
128
+                            StartCoroutine(ChangeCameraPosition(Level[_solvedLevel - 1].transform.position, Level[_solvedLevel].transform.position));
129
+                            Reset();
130
+                        }
131
+                    }
132
+                }
133
+
134
+                _nextAdvance -= Time.smoothDeltaTime;
135
+            }
136
+        }
137
+
138
+        IEnumerator ChangeBarPercentage(float from, float to)
139
+        {
140
+            float time = 0f;
141
+
142
+            while (time < PlaySpeed)
143
+            {
144
+                time += Time.deltaTime;
145
+
146
+                float percentage = BarCurve.Evaluate(time / PlaySpeed);
147
+                float current = from * (1 - percentage) + to * percentage;
148
+                ForestPercentageImage.rectTransform.sizeDelta = new Vector2(current, 64);
149
+                yield return null;
150
+            }
151
+
152
+            ForestPercentageImage.rectTransform.sizeDelta = new Vector2(to, 64);
153
+        }
154
+
155
+        IEnumerator ChangeCameraPosition(Vector2 from, Vector2 to)
156
+        {
157
+            float time = 0f;
158
+            float length = 2f;
159
+
160
+            while (time < length)
161
+            {
162
+                time += Time.deltaTime;
163
+
164
+                float percentage = CameraCurve.Evaluate(time / length);
165
+                Vector3 current = Vector2.Lerp(from, to, percentage);
166
+                Camera.transform.position = new Vector3(current.x, current.y + 1.5f, -10);
167
+                yield return null;
168
+            }
169
+
170
+            Camera.transform.position = new Vector3(to.x, to.y + 1.5f, -10);
23 171
         }
24 172
 
25 173
         public void Play()
26 174
         {
27
-            Level.AdvanceStep();
28
-            ForestCountText.text = Level.ForestCount.ToString();
29
-            CityCountText.text = Level.CityCount.ToString();
175
+            if (!_inProgress)
176
+            {
177
+                if (_currentLevel.CurrentWaterTiles == 0
178
+                    && _currentLevel.CurrentPlainTiles == 0
179
+                    && _currentLevel.CurrentMountainTiles == 0
180
+                    && _currentLevel.CurrentDesertTiles == 0
181
+                    && _currentLevel.CurrentForestTiles == 0
182
+                    && _currentLevel.CurrentVillageTiles == 0
183
+                    && _currentLevel.CurrentCityTiles == 0)
184
+                {
185
+                    _isPlaying = true;
186
+                    _inProgress = true;
187
+                    PlayButton.image.sprite = PauseSprite;
188
+                }
189
+            }
190
+            else
191
+            {
192
+                _isPlaying = !_isPlaying;
193
+                PlayButton.image.sprite = _isPlaying ? PauseSprite : PlaySprite;
194
+                _nextAdvance = 0;
195
+            }
196
+        }
197
+
198
+        private void UpdatePercentage()
199
+        {
200
+            float percentage =
201
+                PercentageImage.rectTransform.rect.width /
202
+                ((_currentLevel.ForestCount + _currentLevel.CityCount) / (float)_currentLevel.ForestCount);
203
+
204
+            if (_currentLevel.ForestCount == 0 && _currentLevel.CityCount == 0)
205
+                percentage = PercentageImage.rectTransform.rect.width / 2f;
206
+
207
+            StartCoroutine(ChangeBarPercentage(ForestPercentageImage.rectTransform.sizeDelta.x, percentage));
208
+            ForestCountText.text = _currentLevel.ForestCount.ToString();
209
+            CityCountText.text = _currentLevel.CityCount.ToString();
30 210
         }
31 211
 
32 212
         public void Reset()
33 213
         {
34
-            Level.LoadLevel();
214
+            _isPlaying = false;
215
+            _inProgress = false;
216
+            _nextAdvance = 0;
217
+
218
+            PlayButton.image.sprite = PlaySprite;
219
+            _currentLevel.LoadLevel();
220
+            UpdateResourceBar();
221
+            UpdatePercentage();
222
+        }
223
+
224
+        public void UpdateResourceBar()
225
+        {
226
+            WaterButton.GetComponentInChildren<Text>().text = _currentLevel.CurrentWaterTiles.ToString();
227
+            PlainButton.GetComponentInChildren<Text>().text = _currentLevel.CurrentPlainTiles.ToString();
228
+            MountainButton.GetComponentInChildren<Text>().text = _currentLevel.CurrentMountainTiles.ToString();
229
+            DesertButton.GetComponentInChildren<Text>().text = _currentLevel.CurrentDesertTiles.ToString();
230
+            ForestButton.GetComponentInChildren<Text>().text = _currentLevel.CurrentForestTiles.ToString();
231
+            VillageButton.GetComponentInChildren<Text>().text = _currentLevel.CurrentVillageTiles.ToString();
232
+            CityButton.GetComponentInChildren<Text>().text = _currentLevel.CurrentCityTiles.ToString();
233
+        }
234
+
235
+        public void PlaceTile(int tile)
236
+        {
237
+            bool allowPlacement = false;
238
+
239
+            switch ((Tile)tile)
240
+            {
241
+                case Tile.Water:
242
+                    if (_currentLevel.AvailableWaterTiles > 0)
243
+                        allowPlacement = true;
244
+                    break;
245
+                case Tile.Plain:
246
+                    if (_currentLevel.AvailablePlainTiles > 0)
247
+                        allowPlacement = true;
248
+                    break;
249
+                case Tile.Mountain:
250
+                    if (_currentLevel.AvailableMountainTiles > 0)
251
+                        allowPlacement = true;
252
+                    break;
253
+                case Tile.Desert:
254
+                    if (_currentLevel.AvailableDesertTiles > 0)
255
+                        allowPlacement = true;
256
+                    break;
257
+                case Tile.Forest:
258
+                    if (_currentLevel.AvailableForestTiles > 0)
259
+                        allowPlacement = true;
260
+                    break;
261
+                case Tile.Village:
262
+                    if (_currentLevel.AvailableVillageTiles > 0)
263
+                        allowPlacement = true;
264
+                    break;
265
+                case Tile.City:
266
+                    if (_currentLevel.AvailableCityTiles > 0)
267
+                        allowPlacement = true;
268
+                    break;
269
+                default:
270
+                    throw new Exception("WTF");
271
+            }
272
+
273
+            if (allowPlacement)
274
+            {
275
+                _selectedTile = (Tile)tile;
276
+
277
+                if (_tileCursor != null)
278
+                    Destroy(_tileCursor);
279
+
280
+                GameObject cursor = Instantiate(TileManager.GetByTile((Tile)tile));
281
+                cursor.GetComponent<BoxCollider2D>().enabled = false;
282
+                _tileCursor = cursor;
283
+            }
35 284
         }
36 285
     }
37 286
 }

+ 59
- 3
Assets/Game/Scripts/Level.cs View File

@@ -1,5 +1,6 @@
1 1
 using Assets.Game.Code;
2 2
 using UnityEngine;
3
+using UnityEngine.Video;
3 4
 
4 5
 namespace Assets.Game.Scripts
5 6
 {
@@ -10,6 +11,14 @@ namespace Assets.Game.Scripts
10 11
         public TileManager TileManager;
11 12
         public Sprite LevelSprite;
12 13
 
14
+        public int AvailableWaterTiles;
15
+        public int AvailablePlainTiles;
16
+        public int AvailableMountainTiles;
17
+        public int AvailableDesertTiles;
18
+        public int AvailableForestTiles;
19
+        public int AvailableVillageTiles;
20
+        public int AvailableCityTiles;
21
+
13 22
         public int CityCount;
14 23
         public int ForestCount;
15 24
         private bool _change;
@@ -17,13 +26,21 @@ namespace Assets.Game.Scripts
17 26
         private GameObject[,] _tilesRep;
18 27
         private Tile[,] _tiles;
19 28
 
29
+        public int CurrentWaterTiles;
30
+        public int CurrentPlainTiles;
31
+        public int CurrentMountainTiles;
32
+        public int CurrentDesertTiles;
33
+        public int CurrentForestTiles;
34
+        public int CurrentVillageTiles;
35
+        public int CurrentCityTiles;
36
+
20 37
         // Fuck Unity!
21 38
         private Color BetterYellow = new Color(1, 1, 0, 1);
22 39
 
23 40
         // Use this for initialization
24 41
         public void Start()
25 42
         {
26
-
43
+            LoadLevel();
27 44
         }
28 45
 
29 46
         // Update is called once per frame
@@ -34,8 +51,27 @@ namespace Assets.Game.Scripts
34 51
 
35 52
         public void LoadLevel()
36 53
         {
54
+            if (LevelSprite == null)
55
+                return;
56
+
37 57
             CityCount = 0;
38 58
             ForestCount = 0;
59
+
60
+            CurrentWaterTiles = AvailableWaterTiles;
61
+            CurrentPlainTiles = AvailablePlainTiles;
62
+            CurrentMountainTiles = AvailableMountainTiles;
63
+            CurrentDesertTiles = AvailableDesertTiles;
64
+            CurrentForestTiles = AvailableForestTiles;
65
+            CurrentVillageTiles = AvailableVillageTiles;
66
+            CurrentCityTiles = AvailableCityTiles;
67
+
68
+            if (_tilesRep != null)
69
+                foreach (GameObject tile in _tilesRep)
70
+                {
71
+                    if (tile != null)
72
+                        Destroy(tile);
73
+                }
74
+
39 75
             _tiles = new Tile[Width, Height];
40 76
             _tilesRep = new GameObject[Width, Height];
41 77
 
@@ -65,7 +101,24 @@ namespace Assets.Game.Scripts
65 101
             }
66 102
         }
67 103
 
68
-        private void ApplyTile(int x, int y, Tile tile)
104
+        public TileInfo? GetTileFromObject(GameObject target)
105
+        {
106
+            if (LevelSprite == null)
107
+                return null;
108
+
109
+            for (int x = 0; x < Width; x++)
110
+            {
111
+                for (int y = 0; y < Height; y++)
112
+                {
113
+                    if (target == _tilesRep[x, y])
114
+                        return new TileInfo(x, y, _tiles[x, y]);
115
+                }
116
+            }
117
+
118
+            return null;
119
+        }
120
+
121
+        public void ApplyTile(int x, int y, Tile tile)
69 122
         {
70 123
             if (_tiles[x, y] == tile && _tilesRep[x, y] != null)
71 124
                 return;
@@ -94,7 +147,7 @@ namespace Assets.Game.Scripts
94 147
             GameObject newTile = Instantiate(sourceTile);
95 148
             newTile.transform.parent = transform;
96 149
             newTile.name = string.Format("[{0}|{1}] {2}", x, y, sourceTile.name);
97
-            newTile.transform.position = new Vector3(x - (Width - 1) / 2f, y - (Height - 1) / 2f, 0);
150
+            newTile.transform.localPosition = new Vector3(x - (Width - 1) / 2f, y - (Height - 1) / 2f, 0);
98 151
             _tiles[x, y] = tile;
99 152
             _tilesRep[x, y] = newTile;
100 153
 
@@ -112,6 +165,9 @@ namespace Assets.Game.Scripts
112 165
 
113 166
         private void SpreadTiles(Tile tileA, Tile tileB)
114 167
         {
168
+            if (LevelSprite == null)
169
+                return;
170
+
115 171
             Tile[,] oldTiles = _tiles;
116 172
             _tiles = new Tile[Width, Height];
117 173
 

+ 82
- 0
Assets/Graphics/Materials/Terrain.mat View File

@@ -0,0 +1,82 @@
1
+%YAML 1.1
2
+%TAG !u! tag:unity3d.com,2011:
3
+--- !u!21 &2100000
4
+Material:
5
+  serializedVersion: 6
6
+  m_ObjectHideFlags: 0
7
+  m_PrefabParentObject: {fileID: 0}
8
+  m_PrefabInternal: {fileID: 0}
9
+  m_Name: Terrain
10
+  m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
11
+  m_ShaderKeywords: 
12
+  m_LightmapFlags: 4
13
+  m_EnableInstancingVariants: 0
14
+  m_CustomRenderQueue: -1
15
+  stringTagMap: {}
16
+  disabledShaderPasses: []
17
+  m_SavedProperties:
18
+    serializedVersion: 3
19
+    m_TexEnvs:
20
+    - _BumpMap:
21
+        m_Texture: {fileID: 0}
22
+        m_Scale: {x: 1, y: 1}
23
+        m_Offset: {x: 0, y: 0}
24
+    - _DetailAlbedoMap:
25
+        m_Texture: {fileID: 0}
26
+        m_Scale: {x: 1, y: 1}
27
+        m_Offset: {x: 0, y: 0}
28
+    - _DetailMask:
29
+        m_Texture: {fileID: 0}
30
+        m_Scale: {x: 1, y: 1}
31
+        m_Offset: {x: 0, y: 0}
32
+    - _DetailNormalMap:
33
+        m_Texture: {fileID: 0}
34
+        m_Scale: {x: 1, y: 1}
35
+        m_Offset: {x: 0, y: 0}
36
+    - _EmissionMap:
37
+        m_Texture: {fileID: 0}
38
+        m_Scale: {x: 1, y: 1}
39
+        m_Offset: {x: 0, y: 0}
40
+    - _MainTex:
41
+        m_Texture: {fileID: 2800000, guid: aa5958fc54a6cd3438c0740dd4c87e3e, type: 3}
42
+        m_Scale: {x: 2, y: 0}
43
+        m_Offset: {x: 0, y: 64}
44
+    - _MetallicGlossMap:
45
+        m_Texture: {fileID: 0}
46
+        m_Scale: {x: 1, y: 1}
47
+        m_Offset: {x: 0, y: 0}
48
+    - _OcclusionMap:
49
+        m_Texture: {fileID: 0}
50
+        m_Scale: {x: 1, y: 1}
51
+        m_Offset: {x: 0, y: 0}
52
+    - _ParallaxMap:
53
+        m_Texture: {fileID: 0}
54
+        m_Scale: {x: 1, y: 1}
55
+        m_Offset: {x: 0, y: 0}
56
+    m_Floats:
57
+    - _BumpScale: 1
58
+    - _ColorMask: 15
59
+    - _Cutoff: 0.5
60
+    - _DetailNormalMapScale: 1
61
+    - _DstBlend: 0
62
+    - _GlossMapScale: 1
63
+    - _Glossiness: 0.5
64
+    - _GlossyReflections: 1
65
+    - _Metallic: 0
66
+    - _Mode: 0
67
+    - _OcclusionStrength: 1
68
+    - _Parallax: 0.02
69
+    - _SmoothnessTextureChannel: 0
70
+    - _SpecularHighlights: 1
71
+    - _SrcBlend: 1
72
+    - _Stencil: 0
73
+    - _StencilComp: 8
74
+    - _StencilOp: 0
75
+    - _StencilReadMask: 255
76
+    - _StencilWriteMask: 255
77
+    - _UVSec: 0
78
+    - _UseUIAlphaClip: 0
79
+    - _ZWrite: 1
80
+    m_Colors:
81
+    - _Color: {r: 1, g: 1, b: 1, a: 1}
82
+    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

+ 9
- 0
Assets/Graphics/Materials/Terrain.mat.meta View File

@@ -0,0 +1,9 @@
1
+fileFormatVersion: 2
2
+guid: d1b6f0aa3d0497a4babbc393d703cf0d
3
+timeCreated: 1492898845
4
+licenseType: Free
5
+NativeFormatImporter:
6
+  mainObjectFileID: 2100000
7
+  userData: 
8
+  assetBundleName: 
9
+  assetBundleVariant: 

+ 75
- 0
Assets/Graphics/Materials/Water.mat View File

@@ -0,0 +1,75 @@
1
+%YAML 1.1
2
+%TAG !u! tag:unity3d.com,2011:
3
+--- !u!21 &2100000
4
+Material:
5
+  serializedVersion: 6
6
+  m_ObjectHideFlags: 0
7
+  m_PrefabParentObject: {fileID: 0}
8
+  m_PrefabInternal: {fileID: 0}
9
+  m_Name: Water
10
+  m_Shader: {fileID: 10752, guid: 0000000000000000f000000000000000, type: 0}
11
+  m_ShaderKeywords: 
12
+  m_LightmapFlags: 4
13
+  m_EnableInstancingVariants: 0
14
+  m_CustomRenderQueue: -1
15
+  stringTagMap: {}
16
+  disabledShaderPasses: []
17
+  m_SavedProperties:
18
+    serializedVersion: 3
19
+    m_TexEnvs:
20
+    - _BumpMap:
21
+        m_Texture: {fileID: 0}
22
+        m_Scale: {x: 1, y: 1}
23
+        m_Offset: {x: 0, y: 0}
24
+    - _DetailAlbedoMap:
25
+        m_Texture: {fileID: 0}
26
+        m_Scale: {x: 1, y: 1}
27
+        m_Offset: {x: 0, y: 0}
28
+    - _DetailMask:
29
+        m_Texture: {fileID: 0}
30
+        m_Scale: {x: 1, y: 1}
31
+        m_Offset: {x: 0, y: 0}
32
+    - _DetailNormalMap:
33
+        m_Texture: {fileID: 0}
34
+        m_Scale: {x: 1, y: 1}
35
+        m_Offset: {x: 0, y: 0}
36
+    - _EmissionMap:
37
+        m_Texture: {fileID: 0}
38
+        m_Scale: {x: 1, y: 1}
39
+        m_Offset: {x: 0, y: 0}
40
+    - _MainTex:
41
+        m_Texture: {fileID: 2800000, guid: deb4943b74f241943bbe1b7c8e95eb72, type: 3}
42
+        m_Scale: {x: 150, y: 150}
43
+        m_Offset: {x: 0, y: 0}
44
+    - _MetallicGlossMap:
45
+        m_Texture: {fileID: 0}
46
+        m_Scale: {x: 1, y: 1}
47
+        m_Offset: {x: 0, y: 0}
48
+    - _OcclusionMap:
49
+        m_Texture: {fileID: 0}
50
+        m_Scale: {x: 1, y: 1}
51
+        m_Offset: {x: 0, y: 0}
52
+    - _ParallaxMap:
53
+        m_Texture: {fileID: 0}
54
+        m_Scale: {x: 1, y: 1}
55
+        m_Offset: {x: 0, y: 0}
56
+    m_Floats:
57
+    - _BumpScale: 1
58
+    - _Cutoff: 0.5
59
+    - _DetailNormalMapScale: 1
60
+    - _DstBlend: 0
61
+    - _GlossMapScale: 1
62
+    - _Glossiness: 0.5
63
+    - _GlossyReflections: 1
64
+    - _Metallic: 0
65
+    - _Mode: 0
66
+    - _OcclusionStrength: 1
67
+    - _Parallax: 0.02
68
+    - _SmoothnessTextureChannel: 0
69
+    - _SpecularHighlights: 1
70
+    - _SrcBlend: 1
71
+    - _UVSec: 0
72
+    - _ZWrite: 1
73
+    m_Colors:
74
+    - _Color: {r: 1, g: 1, b: 1, a: 1}
75
+    - _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

+ 9
- 0
Assets/Graphics/Materials/Water.mat.meta View File

@@ -0,0 +1,9 @@
1
+fileFormatVersion: 2
2
+guid: 6f2f9a6f198b25d42a343de053782765
3
+timeCreated: 1492899250
4
+licenseType: Free
5
+NativeFormatImporter:
6
+  mainObjectFileID: 2100000
7
+  userData: 
8
+  assetBundleName: 
9
+  assetBundleVariant: 

BIN
Assets/Graphics/Textures/Level.png View File


+ 1
- 1
Assets/Graphics/Textures/Level.png.meta View File

@@ -46,7 +46,7 @@ TextureImporter:
46 46
   compressionQuality: 50
47 47
   spriteMode: 2
48 48
   spriteExtrude: 1
49
-  spriteMeshType: 1
49
+  spriteMeshType: 0
50 50
   alignment: 0
51 51
   spritePivot: {x: 0.5, y: 0.5}
52 52
   spriteBorder: {x: 0, y: 0, z: 0, w: 0}

BIN
Assets/Graphics/Textures/Pause.png View File


+ 92
- 0
Assets/Graphics/Textures/Pause.png.meta View File

@@ -0,0 +1,92 @@
1
+fileFormatVersion: 2
2
+guid: 4e3674f1580acc648aeeac129c984b00
3
+timeCreated: 1492948094
4
+licenseType: Free
5
+TextureImporter:
6
+  fileIDToRecycleName: {}
7
+  serializedVersion: 4
8
+  mipmaps:
9
+    mipMapMode: 0
10
+    enableMipMap: 0
11
+    sRGBTexture: 1
12
+    linearTexture: 0
13
+    fadeOut: 0
14
+    borderMipMap: 0
15
+    mipMapFadeDistanceStart: 1
16
+    mipMapFadeDistanceEnd: 3
17
+  bumpmap:
18
+    convertToNormalMap: 0
19
+    externalNormalMap: 0
20
+    heightScale: 0.25
21
+    normalMapFilter: 0
22
+  isReadable: 0
23
+  grayScaleToAlpha: 0
24
+  generateCubemap: 6
25
+  cubemapConvolution: 0
26
+  seamlessCubemap: 0
27
+  textureFormat: 1
28
+  maxTextureSize: 2048
29
+  textureSettings:
30
+    filterMode: 0
31
+    aniso: -1
32
+    mipBias: -1
33
+    wrapMode: 1
34
+  nPOTScale: 0
35
+  lightmap: 0
36
+  compressionQuality: 50
37
+  spriteMode: 1
38
+  spriteExtrude: 1
39
+  spriteMeshType: 0
40
+  alignment: 0
41
+  spritePivot: {x: 0.5, y: 0.5}
42
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
43
+  spritePixelsToUnits: 32
44
+  alphaUsage: 1
45
+  alphaIsTransparency: 1
46
+  spriteTessellationDetail: -1
47
+  textureType: 8
48
+  textureShape: 1
49
+  maxTextureSizeSet: 0
50
+  compressionQualitySet: 0
51
+  textureFormatSet: 0
52
+  platformSettings:
53
+  - buildTarget: DefaultTexturePlatform
54
+    maxTextureSize: 2048
55
+    textureFormat: -1
56
+    textureCompression: 0
57
+    compressionQuality: 50
58
+    crunchedCompression: 0
59
+    allowsAlphaSplitting: 0
60
+    overridden: 0
61
+  - buildTarget: Standalone
62
+    maxTextureSize: 2048
63
+    textureFormat: -1
64
+    textureCompression: 0
65
+    compressionQuality: 50
66
+    crunchedCompression: 0
67
+    allowsAlphaSplitting: 0
68
+    overridden: 0
69
+  - buildTarget: Android
70
+    maxTextureSize: 2048
71
+    textureFormat: -1
72
+    textureCompression: 0
73
+    compressionQuality: 50
74
+    crunchedCompression: 0
75
+    allowsAlphaSplitting: 0
76
+    overridden: 0
77
+  - buildTarget: WebGL
78
+    maxTextureSize: 2048
79
+    textureFormat: -1
80
+    textureCompression: 0
81
+    compressionQuality: 50
82
+    crunchedCompression: 0
83
+    allowsAlphaSplitting: 0
84
+    overridden: 0
85
+  spriteSheet:
86
+    serializedVersion: 2
87
+    sprites: []
88
+    outline: []
89
+  spritePackingTag: 
90
+  userData: 
91
+  assetBundleName: 
92
+  assetBundleVariant: 

BIN
Assets/Graphics/Textures/Play.png View File


+ 92
- 0
Assets/Graphics/Textures/Play.png.meta View File

@@ -0,0 +1,92 @@
1
+fileFormatVersion: 2
2
+guid: a4b4e600b05b0bd4ab9953fb43ddeeb3
3
+timeCreated: 1492947442
4
+licenseType: Free
5
+TextureImporter:
6
+  fileIDToRecycleName: {}
7
+  serializedVersion: 4
8
+  mipmaps:
9
+    mipMapMode: 0
10
+    enableMipMap: 0
11
+    sRGBTexture: 1
12
+    linearTexture: 0
13
+    fadeOut: 0
14
+    borderMipMap: 0
15
+    mipMapFadeDistanceStart: 1
16
+    mipMapFadeDistanceEnd: 3
17
+  bumpmap:
18
+    convertToNormalMap: 0
19
+    externalNormalMap: 0
20
+    heightScale: 0.25
21
+    normalMapFilter: 0
22
+  isReadable: 0
23
+  grayScaleToAlpha: 0
24
+  generateCubemap: 6
25
+  cubemapConvolution: 0
26
+  seamlessCubemap: 0
27
+  textureFormat: 1
28
+  maxTextureSize: 2048
29
+  textureSettings:
30
+    filterMode: 0
31
+    aniso: -1
32
+    mipBias: -1
33
+    wrapMode: 1
34
+  nPOTScale: 0
35
+  lightmap: 0
36
+  compressionQuality: 50
37
+  spriteMode: 1
38
+  spriteExtrude: 1
39
+  spriteMeshType: 0
40
+  alignment: 0
41
+  spritePivot: {x: 0.5, y: 0.5}
42
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
43
+  spritePixelsToUnits: 32
44
+  alphaUsage: 1
45
+  alphaIsTransparency: 1
46
+  spriteTessellationDetail: -1
47
+  textureType: 8
48
+  textureShape: 1
49
+  maxTextureSizeSet: 0
50
+  compressionQualitySet: 0
51
+  textureFormatSet: 0
52
+  platformSettings:
53
+  - buildTarget: DefaultTexturePlatform
54
+    maxTextureSize: 2048
55
+    textureFormat: -1
56
+    textureCompression: 0
57
+    compressionQuality: 50
58
+    crunchedCompression: 0
59
+    allowsAlphaSplitting: 0
60
+    overridden: 0
61
+  - buildTarget: Standalone
62
+    maxTextureSize: 2048
63
+    textureFormat: -1
64
+    textureCompression: 0
65
+    compressionQuality: 50
66
+    crunchedCompression: 0
67
+    allowsAlphaSplitting: 0
68
+    overridden: 0
69
+  - buildTarget: Android
70
+    maxTextureSize: 2048
71
+    textureFormat: -1
72
+    textureCompression: 0
73
+    compressionQuality: 50
74
+    crunchedCompression: 0
75
+    allowsAlphaSplitting: 0
76
+    overridden: 0
77
+  - buildTarget: WebGL
78
+    maxTextureSize: 2048
79
+    textureFormat: -1
80
+    textureCompression: 0
81
+    compressionQuality: 50
82
+    crunchedCompression: 0
83
+    allowsAlphaSplitting: 0
84
+    overridden: 0
85
+  spriteSheet:
86
+    serializedVersion: 2
87
+    sprites: []
88
+    outline: []
89
+  spritePackingTag: 
90
+  userData: 
91
+  assetBundleName: 
92
+  assetBundleVariant: 

BIN
Assets/Graphics/Textures/Stop.png View File


+ 92
- 0
Assets/Graphics/Textures/Stop.png.meta View File

@@ -0,0 +1,92 @@
1
+fileFormatVersion: 2
2
+guid: 7860a239e14b6824e8a1ac70dc2d3217
3
+timeCreated: 1492947442
4
+licenseType: Free
5
+TextureImporter:
6
+  fileIDToRecycleName: {}
7
+  serializedVersion: 4
8
+  mipmaps:
9
+    mipMapMode: 0
10
+    enableMipMap: 0
11
+    sRGBTexture: 1
12
+    linearTexture: 0
13
+    fadeOut: 0
14
+    borderMipMap: 0
15
+    mipMapFadeDistanceStart: 1
16
+    mipMapFadeDistanceEnd: 3
17
+  bumpmap:
18
+    convertToNormalMap: 0
19
+    externalNormalMap: 0
20
+    heightScale: 0.25
21
+    normalMapFilter: 0
22
+  isReadable: 0
23
+  grayScaleToAlpha: 0
24
+  generateCubemap: 6
25
+  cubemapConvolution: 0
26
+  seamlessCubemap: 0
27
+  textureFormat: 1
28
+  maxTextureSize: 2048
29
+  textureSettings:
30
+    filterMode: 0
31
+    aniso: -1
32
+    mipBias: -1
33
+    wrapMode: 1
34
+  nPOTScale: 0
35
+  lightmap: 0
36
+  compressionQuality: 50
37
+  spriteMode: 1
38
+  spriteExtrude: 1
39
+  spriteMeshType: 0
40
+  alignment: 0
41
+  spritePivot: {x: 0.5, y: 0.5}
42
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
43
+  spritePixelsToUnits: 32
44
+  alphaUsage: 1
45
+  alphaIsTransparency: 1
46
+  spriteTessellationDetail: -1
47
+  textureType: 8
48
+  textureShape: 1
49
+  maxTextureSizeSet: 0
50
+  compressionQualitySet: 0
51
+  textureFormatSet: 0
52
+  platformSettings:
53
+  - buildTarget: DefaultTexturePlatform
54
+    maxTextureSize: 2048
55
+    textureFormat: -1
56
+    textureCompression: 0
57
+    compressionQuality: 50
58
+    crunchedCompression: 0
59
+    allowsAlphaSplitting: 0
60
+    overridden: 0
61
+  - buildTarget: Standalone
62
+    maxTextureSize: 2048
63
+    textureFormat: -1
64
+    textureCompression: 0
65
+    compressionQuality: 50
66
+    crunchedCompression: 0
67
+    allowsAlphaSplitting: 0
68
+    overridden: 0
69
+  - buildTarget: Android
70
+    maxTextureSize: 2048
71
+    textureFormat: -1
72
+    textureCompression: 0
73
+    compressionQuality: 50
74
+    crunchedCompression: 0
75
+    allowsAlphaSplitting: 0
76
+    overridden: 0
77
+  - buildTarget: WebGL
78
+    maxTextureSize: 2048
79
+    textureFormat: -1
80
+    textureCompression: 0
81
+    compressionQuality: 50
82
+    crunchedCompression: 0
83
+    allowsAlphaSplitting: 0
84
+    overridden: 0
85
+  spriteSheet:
86
+    serializedVersion: 2
87
+    sprites: []
88
+    outline: []
89
+  spritePackingTag: 
90
+  userData: 
91
+  assetBundleName: 
92
+  assetBundleVariant: 

+ 2
- 2
Assets/Graphics/Textures/Terrain.png.meta View File

@@ -40,13 +40,13 @@ TextureImporter:
40 40
     filterMode: 0
41 41
     aniso: -1
42 42
     mipBias: -1
43
-    wrapMode: 1
43
+    wrapMode: 0
44 44
   nPOTScale: 0
45 45
   lightmap: 0
46 46
   compressionQuality: 50
47 47
   spriteMode: 2
48 48
   spriteExtrude: 1
49
-  spriteMeshType: 1
49
+  spriteMeshType: 0
50 50
   alignment: 0
51 51
   spritePivot: {x: 0.5, y: 0.5}
52 52
   spriteBorder: {x: 0, y: 0, z: 0, w: 0}

BIN
Assets/Graphics/Textures/Water.png View File


+ 92
- 0
Assets/Graphics/Textures/Water.png.meta View File

@@ -0,0 +1,92 @@
1
+fileFormatVersion: 2
2
+guid: deb4943b74f241943bbe1b7c8e95eb72
3
+timeCreated: 1492899217
4
+licenseType: Free
5
+TextureImporter:
6
+  fileIDToRecycleName: {}
7
+  serializedVersion: 4
8
+  mipmaps:
9
+    mipMapMode: 0
10
+    enableMipMap: 0
11
+    sRGBTexture: 1
12
+    linearTexture: 0
13
+    fadeOut: 0
14
+    borderMipMap: 0
15
+    mipMapFadeDistanceStart: 1
16
+    mipMapFadeDistanceEnd: 3
17
+  bumpmap:
18
+    convertToNormalMap: 0
19
+    externalNormalMap: 0
20
+    heightScale: 0.25
21
+    normalMapFilter: 0
22
+  isReadable: 0
23
+  grayScaleToAlpha: 0
24
+  generateCubemap: 6
25
+  cubemapConvolution: 0
26
+  seamlessCubemap: 0
27
+  textureFormat: 1
28
+  maxTextureSize: 2048
29
+  textureSettings:
30
+    filterMode: 0
31
+    aniso: -1
32
+    mipBias: -1
33
+    wrapMode: 0
34
+  nPOTScale: 0
35
+  lightmap: 0
36
+  compressionQuality: 50
37
+  spriteMode: 1
38
+  spriteExtrude: 1
39
+  spriteMeshType: 1
40
+  alignment: 0
41
+  spritePivot: {x: 0.5, y: 0.5}
42
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
43
+  spritePixelsToUnits: 100
44
+  alphaUsage: 1
45
+  alphaIsTransparency: 1
46
+  spriteTessellationDetail: -1
47
+  textureType: 0
48
+  textureShape: 1
49
+  maxTextureSizeSet: 0
50
+  compressionQualitySet: 0
51
+  textureFormatSet: 0
52
+  platformSettings:
53
+  - buildTarget: DefaultTexturePlatform
54
+    maxTextureSize: 2048
55
+    textureFormat: -1
56
+    textureCompression: 0
57
+    compressionQuality: 50
58
+    crunchedCompression: 0
59
+    allowsAlphaSplitting: 0
60
+    overridden: 0
61
+  - buildTarget: Standalone
62
+    maxTextureSize: 2048
63
+    textureFormat: -1
64
+    textureCompression: 0
65
+    compressionQuality: 50
66
+    crunchedCompression: 0
67
+    allowsAlphaSplitting: 0
68
+    overridden: 0
69
+  - buildTarget: Android
70
+    maxTextureSize: 2048
71
+    textureFormat: -1
72
+    textureCompression: 0
73
+    compressionQuality: 50
74
+    crunchedCompression: 0
75
+    allowsAlphaSplitting: 0
76
+    overridden: 0
77
+  - buildTarget: WebGL
78
+    maxTextureSize: 2048
79
+    textureFormat: -1
80
+    textureCompression: 0
81
+    compressionQuality: 50
82
+    crunchedCompression: 0
83
+    allowsAlphaSplitting: 0
84
+    overridden: 0
85
+  spriteSheet:
86
+    serializedVersion: 2
87
+    sprites: []
88
+    outline: []
89
+  spritePackingTag: 
90
+  userData: 
91
+  assetBundleName: 
92
+  assetBundleVariant: 

+ 6
- 6
ProjectSettings/ProjectSettings.asset View File

@@ -10,8 +10,8 @@ PlayerSettings:
10 10
   targetDevice: 2
11 11
   useOnDemandResources: 0
12 12
   accelerometerFrequency: 60
13
-  companyName: DefaultCompany
14
-  productName: Unity2DProject
13
+  companyName: NekuSoul
14
+  productName: Islands in Equilibrium
15 15
   defaultCursor: {fileID: 0}
16 16
   cursorHotspot: {x: 0, y: 0}
17 17
   m_SplashScreenBackgroundColor: {r: 0.13333334, g: 0.17254902, b: 0.21176471, a: 1}
@@ -113,11 +113,11 @@ PlayerSettings:
113 113
   wiiUAllowScreenCapture: 1
114 114
   wiiUControllerCount: 0
115 115
   m_SupportedAspectRatios:
116
-    4:3: 1
117
-    5:4: 1
118
-    16:10: 1
116
+    4:3: 0
117
+    5:4: 0
118
+    16:10: 0
119 119
     16:9: 1
120
-    Others: 1
120
+    Others: 0
121 121
   bundleVersion: 1.0
122 122
   preloadedAssets: []
123 123
   metroInputSource: 0

Loading…
Cancel
Save