Baricade edit

This commit is contained in:
Kotrba Filip 2020-02-01 20:53:49 +01:00
parent 41a534cd5f
commit edaec6c91f
10 changed files with 311 additions and 88 deletions

View File

@ -79,7 +79,6 @@ namespace GitHub.Unity
PluginImporter importer = AssetImporter.GetAtPath(filepath) as PluginImporter;
if (importer == null)
{
Debug.LogFormat("GitHub for Unity: Could not find importer for {0}. Some functionality may fail.", filepath);
continue;
}
if (importer.GetCompatibleWithEditor() != enable)

View File

@ -1,5 +1,33 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!64 &1802929862987333833
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 256051067918925093}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: 2212009239438826721, guid: 528f4b131abb8f9498400c1cf4283eca, type: 3}
--- !u!64 &2710415013452409851
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 965572206314881976}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: -8678823145569952518, guid: 528f4b131abb8f9498400c1cf4283eca, type: 3}
--- !u!1 &1999182813209888360
GameObject:
m_ObjectHideFlags: 0
@ -46,6 +74,92 @@ MonoBehaviour:
m_EditorClassIdentifier:
blockType: 1
health: 100
healthRate: 5
amountModels: []
--- !u!64 &8278126805500112627
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3847955541176867416}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: 4493585093827132993, guid: 528f4b131abb8f9498400c1cf4283eca, type: 3}
--- !u!64 &589671193672791976
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3952444572634493808}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: 2534964839176971238, guid: 528f4b131abb8f9498400c1cf4283eca, type: 3}
--- !u!64 &413455806600404748
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4850250424701318178}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: -7387706064836869012, guid: 528f4b131abb8f9498400c1cf4283eca, type: 3}
--- !u!64 &606751798092975167
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6266030662392703044}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: -5495902117074765545, guid: 528f4b131abb8f9498400c1cf4283eca, type: 3}
--- !u!64 &4559245291351294251
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7799514952860760797}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: -5053925668127403250, guid: 528f4b131abb8f9498400c1cf4283eca, type: 3}
--- !u!64 &6352464571720791550
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 9095210850575404026}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 3
m_Convex: 1
m_CookingOptions: 30
m_Mesh: {fileID: 8691780276856062721, guid: 528f4b131abb8f9498400c1cf4283eca, type: 3}
--- !u!1001 &8380342326956505725
PrefabInstance:
m_ObjectHideFlags: 0
@ -53,6 +167,12 @@ PrefabInstance:
m_Modification:
m_TransformParent: {fileID: 874380372637160946}
m_Modifications:
- target: {fileID: -6054058774237248251, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: -4042805660767941618, guid: c5e781ac470bf2c469882550ede67f06,
type: 3}
- target: {fileID: -4216859302048453862, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
propertyPath: m_LocalPosition.x
@ -128,6 +248,43 @@ PrefabInstance:
propertyPath: m_Name
value: spikes
objectReference: {fileID: 0}
- target: {fileID: -113181020801827196, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 427c5d2662e5f764484aeb5e62dd64ab, type: 2}
- target: {fileID: 608615394619914483, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 427c5d2662e5f764484aeb5e62dd64ab, type: 2}
- target: {fileID: 1066910053003865102, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 427c5d2662e5f764484aeb5e62dd64ab, type: 2}
- target: {fileID: 1323765397811007978, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 427c5d2662e5f764484aeb5e62dd64ab, type: 2}
- target: {fileID: 1711277887553122256, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: -4042805660767941618, guid: c5e781ac470bf2c469882550ede67f06,
type: 3}
- target: {fileID: 4063835366044962077, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: -4042805660767941618, guid: c5e781ac470bf2c469882550ede67f06,
type: 3}
- target: {fileID: 5490870052100550915, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 2100000, guid: 427c5d2662e5f764484aeb5e62dd64ab, type: 2}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 528f4b131abb8f9498400c1cf4283eca, type: 3}
--- !u!4 &3546092385323716967 stripped
@ -136,3 +293,51 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 8380342326956505725}
m_PrefabAsset: {fileID: 0}
--- !u!1 &6266030662392703044 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 2502203975881118265, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
m_PrefabInstance: {fileID: 8380342326956505725}
m_PrefabAsset: {fileID: 0}
--- !u!1 &3847955541176867416 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 4695666576454475813, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
m_PrefabInstance: {fileID: 8380342326956505725}
m_PrefabAsset: {fileID: 0}
--- !u!1 &965572206314881976 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: -492420421572216379, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
m_PrefabInstance: {fileID: 8380342326956505725}
m_PrefabAsset: {fileID: 0}
--- !u!1 &7799514952860760797 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: -7462036371361415008, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
m_PrefabInstance: {fileID: 8380342326956505725}
m_PrefabAsset: {fileID: 0}
--- !u!1 &256051067918925093 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: -594094835925579944, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
m_PrefabInstance: {fileID: 8380342326956505725}
m_PrefabAsset: {fileID: 0}
--- !u!1 &3952444572634493808 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: -4425609515867240179, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
m_PrefabInstance: {fileID: 8380342326956505725}
m_PrefabAsset: {fileID: 0}
--- !u!1 &4850250424701318178 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: -5259225927154676129, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
m_PrefabInstance: {fileID: 8380342326956505725}
m_PrefabAsset: {fileID: 0}
--- !u!1 &9095210850575404026 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: -8470045053010906745, guid: 528f4b131abb8f9498400c1cf4283eca,
type: 3}
m_PrefabInstance: {fileID: 8380342326956505725}
m_PrefabAsset: {fileID: 0}

View File

@ -231,28 +231,28 @@ MonoBehaviour:
health: 100
healthRate: 5
amountModels:
- {fileID: 4443642083919416725}
- {fileID: 5205200862043998919}
- {fileID: 8452048823607473439}
- {fileID: 8456627140763662303}
- {fileID: 7373073294925482436}
- {fileID: 4937171485821671441}
- {fileID: 1639123759080977681}
- {fileID: 715030014523983583}
- {fileID: 6141267715529604239}
- {fileID: 857922654142497041}
- {fileID: 4555224919543958357}
- {fileID: 8845523186980114736}
- {fileID: 6629251295739648829}
- {fileID: 2583879648814668796}
- {fileID: 5626775279250410506}
- {fileID: 3898591326953282408}
- {fileID: 2469224091592576205}
- {fileID: 6841636828864525375}
- {fileID: 8190553761067856993}
- {fileID: 1840520068144572235}
- {fileID: 2199959104259311449}
- {fileID: 8806615898572238909}
- {fileID: 2199959104259311449}
- {fileID: 1840520068144572235}
- {fileID: 8190553761067856993}
- {fileID: 6841636828864525375}
- {fileID: 2469224091592576205}
- {fileID: 3898591326953282408}
- {fileID: 5626775279250410506}
- {fileID: 2583879648814668796}
- {fileID: 6629251295739648829}
- {fileID: 8845523186980114736}
- {fileID: 4555224919543958357}
- {fileID: 857922654142497041}
- {fileID: 6141267715529604239}
- {fileID: 715030014523983583}
- {fileID: 1639123759080977681}
- {fileID: 4937171485821671441}
- {fileID: 7373073294925482436}
- {fileID: 8456627140763662303}
- {fileID: 8452048823607473439}
- {fileID: 5205200862043998919}
- {fileID: 4443642083919416725}
--- !u!65 &8296172667468284673
BoxCollider:
m_ObjectHideFlags: 0

View File

@ -1497,33 +1497,33 @@ MonoBehaviour:
health: 100
healthRate: 10
amountModels:
- {fileID: 5072048420132254878}
- {fileID: 248512549599306158}
- {fileID: 6980898580401705906}
- {fileID: 1897976111086725114}
- {fileID: 8839370382815059758}
- {fileID: 8768503417553488399}
- {fileID: 2329779877516623269}
- {fileID: 6775036794450576978}
- {fileID: 6199803563995182287}
- {fileID: 6404659247269481042}
- {fileID: 4159915305215488823}
- {fileID: 9160998092549646192}
- {fileID: 3185792367686729924}
- {fileID: 4721978855144505460}
- {fileID: 7381431994624522573}
- {fileID: 618757391011973604}
- {fileID: 5882290588515455028}
- {fileID: 1381889007306692253}
- {fileID: 5548633833234765463}
- {fileID: 1003082737763468099}
- {fileID: 1090375850311900763}
- {fileID: 5396578295194344855}
- {fileID: 1585754648870115333}
- {fileID: 3278748000320003741}
- {fileID: 8487709724287121870}
- {fileID: 2697596682010262550}
- {fileID: 3682382153138045620}
- {fileID: 2697596682010262550}
- {fileID: 8487709724287121870}
- {fileID: 3278748000320003741}
- {fileID: 1585754648870115333}
- {fileID: 5396578295194344855}
- {fileID: 1090375850311900763}
- {fileID: 1003082737763468099}
- {fileID: 5548633833234765463}
- {fileID: 1381889007306692253}
- {fileID: 5882290588515455028}
- {fileID: 618757391011973604}
- {fileID: 7381431994624522573}
- {fileID: 4721978855144505460}
- {fileID: 3185792367686729924}
- {fileID: 9160998092549646192}
- {fileID: 4159915305215488823}
- {fileID: 6404659247269481042}
- {fileID: 6199803563995182287}
- {fileID: 6775036794450576978}
- {fileID: 2329779877516623269}
- {fileID: 8768503417553488399}
- {fileID: 8839370382815059758}
- {fileID: 1897976111086725114}
- {fileID: 6980898580401705906}
- {fileID: 248512549599306158}
- {fileID: 5072048420132254878}
--- !u!65 &2435173728554922900
BoxCollider:
m_ObjectHideFlags: 0

View File

@ -379,7 +379,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
@ -621,7 +621,7 @@ AudioSource:
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 0
Loop: 1
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
@ -703,6 +703,20 @@ AudioSource:
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &532783941
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 532783938}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7b4c3ee9caf3c064988179097d1d6d91, type: 3}
m_Name:
m_EditorClassIdentifier:
musicSource: {fileID: 532783940}
Music: {fileID: 8300000, guid: 2842b38130c2ae343b9372edad7281bf, type: 3}
--- !u!1 &587476769
GameObject:
m_ObjectHideFlags: 0
@ -1026,7 +1040,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
@ -1130,7 +1144,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
@ -1538,7 +1552,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.392}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
@ -1727,7 +1741,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 0.5294118}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
@ -1760,7 +1774,7 @@ GameObject:
- component: {fileID: 1753935066}
- component: {fileID: 1753935065}
- component: {fileID: 1753935064}
m_Layer: 9
m_Layer: 8
m_Name: Ground
m_TagString: Untagged
m_Icon: {fileID: 0}
@ -2122,7 +2136,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastTarget: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []

View File

@ -22,17 +22,13 @@ public class DayManager : MonoBehaviour
{
float sunRotationX = transform.localEulerAngles.x;
sunRotationX = (sunRotationX > 180) ? sunRotationX - 360 : sunRotationX;
Debug.Log(sunRotationX.ToString());
if (sunRotationX < 0 && !night)
{
Debug.Log("It is a Night");
mainSource.PlayOneShot(nigtClip);
night = true;
}
else if (sunRotationX > 0 && night)
{
Debug.Log("It is a Day");
mainSource.PlayOneShot(dayClip);
night = false;
}

View File

@ -22,12 +22,15 @@ public class PlayerManager : MonoBehaviour
public List<GameObject> weaponList = new List<GameObject>();
private GameObject createWeapon;
public GuiManager guiManager;
[HideInInspector]public int selectedWeapon = 0;
public int selectedWeapon = 0;
private float selectRate = 1;
private float selectTime = 1;
// Start is called before the first frame update
void Start()
{
selectTime = selectRate;
actualHealth = health;
buildTime = buildRate;
playerCamera = GetComponentInChildren<Camera>();
@ -120,43 +123,27 @@ public class PlayerManager : MonoBehaviour
void SelectWeapon()
{
if (weaponList.Count > 0)
{
if (Input.mouseScrollDelta.y > 0)
{
WeaponManager weaponManager = weaponList[selectedWeapon].GetComponent<WeaponManager>();
if (weaponManager != null) {
weaponManager.player = this;
Debug.Log(weaponList.Count);
if (Input.GetAxis("Mouse ScrollWheel") > 0 && selectTime < Time.time)
{
if (weaponManager != null && createWeapon != null)
{
Destroy(createWeapon);
}
if (weaponList.Count > selectedWeapon + 1) {
selectedWeapon++;
}
else
else if (Input.GetAxis("Mouse ScrollWheel") < 0 && selectTime < Time.time)
{
selectedWeapon = 0;
}
}
else if (Input.mouseScrollDelta.y < 0)
{
WeaponManager weaponManager = weaponList[selectedWeapon].GetComponent<WeaponManager>();
weaponManager.player = this;
if (weaponManager != null && createWeapon != null)
{
Destroy(createWeapon);
}
if (selectedWeapon > 0)
{
selectedWeapon--;
}
else
{
selectedWeapon = weaponList.Count - 1;
}
}
WeaponManager weaponManager2 = weaponList[selectedWeapon].GetComponent<WeaponManager>();
weaponManager2.player = this;
if (weaponManager2 != null && createWeapon == null)
weaponManager.player = this;
if (weaponManager != null && createWeapon == null)
{
createWeapon = Instantiate(weaponList[selectedWeapon]) as GameObject;
createWeapon.transform.parent = playerCamera.transform;
@ -164,6 +151,31 @@ public class PlayerManager : MonoBehaviour
createWeapon.transform.localEulerAngles = Vector3.zero;
}
}
if (Input.GetAxis("Mouse ScrollWheel") > 0 && selectTime < Time.time)
{
if (weaponList.Count - 1 > selectedWeapon)
{
selectedWeapon += 1;
}
else
{
selectedWeapon = 0;
}
selectTime = selectRate + Time.time;
}
else if (Input.GetAxis("Mouse ScrollWheel") < 0 && selectTime < Time.time)
{
if (selectedWeapon > 0)
{
selectedWeapon -= 1;
}
else
{
selectedWeapon = weaponList.Count - 1;
}
selectTime = selectRate + Time.time;
}
}
}
void BuildBlock ()

View File

@ -25,13 +25,10 @@ public class SpawnManager : MonoBehaviour
float sunRotationX = Sun.transform.localEulerAngles.x;
sunRotationX = (sunRotationX > 180) ? sunRotationX - 360 : sunRotationX;
Debug.Log(sunRotationX.ToString());
if (sunRotationX < 0)
{
Debug.Log("It is a Night");
night = true;
} else {
Debug.Log("It is a Day");
night = false;
}