Add splashscreen, FarmPanel and VillagePanel. Modification of MAScene.

This commit is contained in:
Marc-Antoine Dumont 2015-08-13 21:10:25 -04:00
parent 47f8963dab
commit cf4d125764
21 changed files with 3512 additions and 36 deletions

View File

@ -0,0 +1,31 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class FarmStatsController : MonoBehaviour {
public Text textNbMaison;
public Text textNbHuman;
public Text textNbMaxHuman;
private Stats stats;
// Use this for initialization
void Start()
{
stats = GameObject.Find("Stats").gameObject.GetComponent<Stats>();
UpdateView();
}
// Update is called once per frame
void Update()
{
}
private void UpdateView()
{
textNbMaison.text = "Nb Maisons : " + stats.AmountHumanHouse;
textNbHuman.text = "Nb Humans : " + stats.AmountOfHumans;
textNbMaxHuman.text = "Max Humans : " + stats.AmountHumanHouse * 10;
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 2d39e2d1c10cc7544b126554203b7c2c
timeCreated: 1439495569
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,28 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class VillageStatsController : MonoBehaviour {
public Text textNbMaison;
public Text textNbZombie;
public Text textNbMaxZombie;
private Stats stats;
// Use this for initialization
void Start () {
stats = GameObject.Find("Stats").gameObject.GetComponent<Stats>();
UpdateView();
}
// Update is called once per frame
void Update () {
}
private void UpdateView(){
textNbMaison.text = "Nb Maisons : " + stats.AmountZombieHouse;
textNbZombie.text = "Nb Zombies : " + stats.AmountOfZombies;
textNbMaxZombie.text = "Max Zombies : " + stats.AmountZombieHouse * 10;
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e372b80346d3d1a4ab9b849fd37042a9
timeCreated: 1439495556
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,69 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class WorkerControllerConvertCorps : MonoBehaviour {
public Text nbWorker;
public Text zombieAvailable;
public Text nbRessourceExpected;
public Text nbCorpseAvailable;
public Button AddButton;
public Button RemoveButton;
private Stats stats;
public void AddWorker()
{
stats.removeZombieAvail();
stats.NbZombieAssigneCorpse++;
stats.AmountOfCorpse--;
UpdateView();
}
public void LessWorker()
{
stats.addZombieAvail();
stats.NbZombieAssigneCorpse--;
stats.AmountOfCorpse--;
UpdateView();
}
private void UpdateView()
{
zombieAvailable.text = "Zombie Available : " + stats.AmountOfZombiesAvail + "/" + stats.AmountOfZombies;
nbRessourceExpected.text = "Zombie Expected : " + stats.NbZombieAssigneCorpse;
nbWorker.text = "" + stats.NbZombieAssigneCorpse;
nbCorpseAvailable.text = "Corpse : " + stats.AmountOfCorpse;
if (stats.AmountOfZombiesAvail <= 0 || stats.AmountOfCorpse <= 0)
{
AddButton.enabled = false;
}
else
{
AddButton.enabled = true;
}
if (stats.NbZombieAssigneCorpse <= 0)
{
RemoveButton.enabled = false;
}
else
{
RemoveButton.enabled = true;
}
}
// Use this for initialization
void Start()
{
stats = GameObject.Find("Stats").gameObject.GetComponent<Stats>();
}
// Update is called once per frame
void Update()
{
UpdateView();
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: d46a4666c2b14e949abdc9828bf7bc53
timeCreated: 1439502118
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,7 +5,7 @@ using UnityEngine.UI;
public class WorkerControllerMeat : MonoBehaviour
{
public Text nbWorker;
/*public Text nbWorker;
public Text zombieAvailable;
public Text nbRessourceExpected;
public Button AddButton;
@ -57,12 +57,11 @@ public class WorkerControllerMeat : MonoBehaviour
void Start()
{
stats = GameObject.Find("Stats").gameObject.GetComponent<Stats>();
//UpdateView();
}
// Update is called once per frame
void Update()
{
UpdateView();
}
}*/
}

View File

@ -0,0 +1,68 @@
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
public class ZombieEatController : MonoBehaviour {
public Text nbWorker;
public Text zombieAvailable;
public Text nbRessourceExpected;
public Text nbCorpseAvailable;
public Button AddButton;
public Button RemoveButton;
private Stats stats;
public void AddWorker()
{
stats.removeZombieAvail();
stats.NbZombieAssigneEat++;
stats.AmountOfCorpse--;
UpdateView();
}
public void LessWorker()
{
stats.addZombieAvail();
stats.NbZombieAssigneEat--;
stats.AmountOfCorpse--;
UpdateView();
}
private void UpdateView()
{
zombieAvailable.text = "Zombie Available : " + stats.AmountOfZombiesAvail + "/" + stats.AmountOfZombies;
nbRessourceExpected.text = "Zombie Expected : " + stats.NbZombieAssigneEat * stats.NbOfHungerByCoprseEat;
nbWorker.text = "" + stats.NbZombieAssigneEat;
nbCorpseAvailable.text = "Corpse : " + stats.AmountOfCorpse;
if (stats.AmountOfZombiesAvail <= 0 || stats.AmountOfCorpse <= 0)
{
AddButton.enabled = false;
}
else
{
AddButton.enabled = true;
}
if (stats.NbZombieAssigneEat <= 0)
{
RemoveButton.enabled = false;
}
else
{
RemoveButton.enabled = true;
}
}
// Use this for initialization
void Start()
{
stats = GameObject.Find("Stats").gameObject.GetComponent<Stats>();
}
// Update is called once per frame
void Update()
{
UpdateView();
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 9ac5eebd1608f0a42b3522fcdbb55216
timeCreated: 1439508242
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,575 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
SceneSettings:
m_ObjectHideFlags: 0
m_PVSData:
m_PVSObjectsArray: []
m_PVSPortalsArray: []
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: .25
backfaceThreshold: 100
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 6
m_Fog: 0
m_FogColor: {r: .5, g: .5, b: .5, a: 1}
m_FogMode: 3
m_FogDensity: .00999999978
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: .211999997, g: .226999998, b: .259000003, a: 1}
m_AmbientEquatorColor: {r: .114, g: .125, b: .133000001, a: 1}
m_AmbientGroundColor: {r: .0469999984, g: .0430000015, b: .0350000001, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: .5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
--- !u!127 &3
LevelGameManager:
m_ObjectHideFlags: 0
--- !u!157 &4
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 5
m_GIWorkflowMode: 0
m_LightmapsMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 3
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AOMaxDistance: 1
m_Padding: 2
m_CompAOExponent: 0
m_LightmapParameters: {fileID: 0}
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherRayCount: 1024
m_LightmapSnapshot: {fileID: 0}
m_RuntimeCPUUsage: 25
--- !u!196 &5
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentRadius: .5
agentHeight: 2
agentSlope: 45
agentClimb: .400000006
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
accuratePlacement: 0
minRegionArea: 2
cellSize: .166666672
manualCellSize: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &585076541
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 585076545}
- 114: {fileID: 585076544}
- 114: {fileID: 585076543}
- 114: {fileID: 585076542}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &585076542
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 585076541}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_AllowActivationOnStandalone: 0
--- !u!114 &585076543
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 585076541}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_HorizontalAxis: Horizontal
m_VerticalAxis: Vertical
m_SubmitButton: Submit
m_CancelButton: Cancel
m_InputActionsPerSecond: 10
m_AllowActivationOnMobileDevice: 0
--- !u!114 &585076544
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 585076541}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_FirstSelected: {fileID: 0}
m_sendNavigationEvents: 1
m_DragThreshold: 5
--- !u!4 &585076545
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 585076541}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
--- !u!1 &777743501
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 777743506}
- 20: {fileID: 777743505}
- 92: {fileID: 777743504}
- 124: {fileID: 777743503}
- 81: {fileID: 777743502}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &777743502
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 777743501}
m_Enabled: 1
--- !u!124 &777743503
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 777743501}
m_Enabled: 1
--- !u!92 &777743504
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 777743501}
m_Enabled: 1
--- !u!20 &777743505
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 777743501}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: .300000012
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_HDR: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: .0219999999
--- !u!4 &777743506
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 777743501}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!1 &924357422
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 224: {fileID: 924357423}
- 222: {fileID: 924357426}
- 114: {fileID: 924357425}
- 223: {fileID: 924357424}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &924357423
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 924357422}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1100794927}
m_RootOrder: 0
m_AnchorMin: {x: .5, y: .5}
m_AnchorMax: {x: .5, y: .5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1280, y: 720}
m_Pivot: {x: .5, y: .5}
--- !u!223 &924357424
Canvas:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 924357422}
m_Enabled: 1
serializedVersion: 2
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 1
m_OverridePixelPerfect: 0
m_SortingLayerID: 0
m_SortingOrder: 1
--- !u!114 &924357425
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 924357422}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_Sprite: {fileID: 21300000, guid: 3a259568f5e72354c8ad5747ab703287, type: 3}
m_Type: 0
m_PreserveAspect: 1
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &924357426
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 924357422}
--- !u!1 &1053936247
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 224: {fileID: 1053936248}
- 222: {fileID: 1053936250}
- 114: {fileID: 1053936249}
m_Layer: 5
m_Name: RawImage
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1053936248
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1053936247}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 392}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1100794927}
m_RootOrder: 1
m_AnchorMin: {x: .5, y: .5}
m_AnchorMax: {x: .5, y: .5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 4000, y: 4000}
m_Pivot: {x: .5, y: .5}
--- !u!114 &1053936249
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1053936247}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -98529514, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_Texture: {fileID: 0}
m_UVRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
--- !u!222 &1053936250
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1053936247}
--- !u!1 &1100794923
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 224: {fileID: 1100794927}
- 223: {fileID: 1100794926}
- 114: {fileID: 1100794925}
- 114: {fileID: 1100794924}
m_Layer: 5
m_Name: Canvas
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1100794924
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1100794923}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!114 &1100794925
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1100794923}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 1280, y: 720}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: .5
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1
--- !u!223 &1100794926
Canvas:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1100794923}
m_Enabled: 1
serializedVersion: 2
m_RenderMode: 0
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingLayerID: 0
m_SortingOrder: 0
--- !u!224 &1100794927
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1100794923}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0, y: 0, z: 0}
m_Children:
- {fileID: 924357423}
- {fileID: 1053936248}
m_Father: {fileID: 0}
m_RootOrder: 2
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!1 &1471935032
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1471935034}
- 114: {fileID: 1471935033}
m_Layer: 0
m_Name: SplashController
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1471935033
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1471935032}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cf27107ca25d4ab409b7b9ef5032e55b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!4 &1471935034
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1471935032}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 710.916138, y: 453.92804, z: 54.3767624}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
--- !u!1 &1873665270
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 4
m_Component:
- 4: {fileID: 1873665272}
- 108: {fileID: 1873665271}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1873665271
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1873665270}
m_Enabled: 1
serializedVersion: 6
m_Type: 1
m_Color: {r: 1, g: .956862748, b: .839215696, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_Strength: 1
m_Bias: .0500000007
m_NormalBias: .400000006
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_BounceIntensity: 1
m_ShadowRadius: 0
m_ShadowAngle: 0
m_AreaSize: {x: 1, y: 1}
--- !u!4 &1873665272
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1873665270}
m_LocalRotation: {x: .408217937, y: -.234569728, z: .109381676, w: .875426054}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d3134c3be4a1d1145bcb9b11c6a7971e
timeCreated: 1439239992
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -238,7 +238,7 @@ MonoBehaviour:
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument: SceneTest
m_StringArgument: MaScene
m_BoolArgument: 1
m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,

View File

@ -0,0 +1,24 @@
using UnityEngine;
using System.Collections;
public class SplashController : MonoBehaviour {
// Use this for initialization
void Start () {
StartCoroutine(AutoSkip());
}
// Update is called once per frame
void Update () {
if (Input.anyKeyDown) {
Application.LoadLevel(1);
}
}
IEnumerator AutoSkip() {
yield return new WaitForSeconds(5);
Application.LoadLevel(1);
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: cf27107ca25d4ab409b7b9ef5032e55b
timeCreated: 1439238209
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -21,11 +21,13 @@ public class Stats : MonoBehaviour
private int nbOfRockByZombie;
private int nbOfMeatByZombie;
private int nbOfCorpseByZombie;
private int nbOfHungerByCoprseEat;
private int nbZombieAssigneWood;
private int nbZombieAssigneRock;
private int nbZombieAssigneCorpse;
private int nbZombieAssigneMeat;
private int nbZombieAssigneEat;
private int nbZombieAssigneMakeEatHuman;
private int nbHumanHouses;
private int nbZombieHouses;
@ -57,11 +59,20 @@ public class Stats : MonoBehaviour
set { nbZombieHouses = value; }
}
public int NbZombieAssigneMeat
public int NbZombieAssigneEat
{
get { return nbZombieAssigneMeat;}
set { nbZombieAssigneMeat = value;}
}
get { return nbZombieAssigneEat;}
set { nbZombieAssigneEat = value;}
}
public int NbZombieAssigneMakeEatHuman
{
get { return nbZombieAssigneMakeEatHuman; }
set { nbZombieAssigneMakeEatHuman = value; }
}
public int NbZombieAssigneCorpse
{
@ -104,6 +115,12 @@ public class Stats : MonoBehaviour
get { return nbOfWoodByZombie; }
set { nbOfWoodByZombie = value; }
}
public int NbOfHungerByCoprseEat
{
get { return nbOfHungerByCoprseEat; }
set { nbOfHungerByCoprseEat = value; }
}
public int AmountOfMeat
{
@ -244,7 +261,6 @@ public class Stats : MonoBehaviour
NbZombieAssigneWood = 0;
NbZombieAssigneRock = 0;
NbZombieAssigneCorpse = 0;
NbZombieAssigneMeat = 0;
AmountOfZombiesAvail = AmountOfZombies;
AmountOfHHunger = 250 * AmountOfHumans;
AmountOfZHunger = 500 * AmountOfZombies;
@ -253,7 +269,7 @@ public class Stats : MonoBehaviour
private void applyStatModifications()
{
AmountOfCorpse += (NbZombieAssigneCorpse * NbOfCorpseByZombie);
AmountOfMeat += (NbZombieAssigneMeat * NbOfMeatByZombie);
//AmountOfMeat += (NbZombieAssigneMeat * NbOfMeatByZombie);
AmountOfRock += (NbZombieAssigneRock * NbOfRockByZombie);
AmountOfWood += (NbZombieAssigneWood * NbOfWoodByZombie);
}
@ -316,7 +332,7 @@ public class Stats : MonoBehaviour
String body = "";
body += "+" + NbZombieAssigneWood * NbOfWoodByZombie + "\n" + "\n";
body += "+" + NbZombieAssigneRock * NbOfRockByZombie + "\n" + "\n";
body += "+" + NbZombieAssigneMeat * NbOfMeatByZombie + "\n" + "\n";
body += "+" + nbZombieAssigneMakeEatHuman * NbOfMeatByZombie + "\n" + "\n";
body += "+" + NbZombieAssigneCorpse * NbOfCorpseByZombie + "\n" + "\n";
return body;

9
Assets/SplashScreen.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 47a6dc652821b6d4e9413a3bce116a72
folderAsset: yes
timeCreated: 1439495229
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

View File

@ -0,0 +1,55 @@
fileFormatVersion: 2
guid: 3a259568f5e72354c8ad5747ab703287
timeCreated: 1439234622
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: .25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 8
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -3
maxTextureSize: 4096
textureSettings:
filterMode: -1
aniso: 16
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: .5, y: .5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
textureType: 8
buildTargetSettings: []
spriteSheet:
sprites: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -5,7 +5,9 @@ EditorBuildSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scene/AwesomeSplashScreen.unity
- enabled: 1
path: Assets/Scene/Menu.unity
- enabled: 1
path: Assets/Scene/SceneTest.unity
path: Assets/Scene/MAScene.unity

View File

@ -132,7 +132,11 @@ PlayerSettings:
banner: {fileID: 0}
androidGamepadSupportLevel: 0
resolutionDialogBanner: {fileID: 0}
m_BuildTargetIcons: []
m_BuildTargetIcons:
- m_BuildTarget:
m_Icons:
- m_Icon: {fileID: 0}
m_Size: 128
m_BuildTargetBatching: []
m_BuildTargetGraphicsAPIs: []
webPlayerTemplate: APPLICATION:Default