Création de dossiers Script/PlayerAction et Prefab/Yield

Déplacé le enum ResourceChoice vers classe Enum

Suppression des fichiers .orig créés lors du merge conflict
This commit is contained in:
Ader Alisma 01 2023-06-12 21:05:17 -04:00
parent 475ebbaac6
commit 94f918d2dc
15 changed files with 28 additions and 49 deletions

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: 33f9649109a42ed4eb5adf1bef280046
guid: 070f4a098d5a23c4595bcba6dee7bd1c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

9
Assets/Scripts/Enum.cs Normal file
View File

@ -0,0 +1,9 @@
public class Enum
{
public enum ResourceChoice
{
Rock,
Wood,
Food
};
}

View File

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

View File

@ -1,5 +1,6 @@
fileFormatVersion: 2
guid: dc323a4657283c04991e165963a0238b
guid: 441c4a0f2bcadbe4699f8f9641f20a51
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:

View File

@ -8,16 +8,9 @@ public class ResourceMaker : MonoBehaviour
[SerializeField]
private int _resourceMakingAmount;
[SerializeField]
private ResourceChoice _resourceChoice;
private Enum.ResourceChoice _resourceChoice;
private ResourceManager _resourceManagerInstance;
public enum ResourceChoice
{
Rock,
Wood,
Food
};
private void Start()
{
_resourceManagerInstance = ResourceManager.Instance;
@ -30,13 +23,13 @@ public class ResourceMaker : MonoBehaviour
{
switch (_resourceChoice)
{
case ResourceChoice.Rock:
case Enum.ResourceChoice.Rock:
_resourceManagerInstance.RockAmount = _resourceMakingAmount;
break;
case ResourceChoice.Wood:
case Enum.ResourceChoice.Wood:
_resourceManagerInstance.WoodAmount = _resourceMakingAmount;
break;
case ResourceChoice.Food:
case Enum.ResourceChoice.Food:
_resourceManagerInstance.FoodAmount = _resourceMakingAmount;
break;
}

View File

@ -1,12 +0,0 @@
fileFormatVersion: 2
<<<<<<< HEAD
guid: 953a02bba997b9348bee7f306f609a96
=======
guid: 7568f730b2ba3754297a7612452482e2
>>>>>>> origin/main
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,24 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 84b05f2a26f63da46a1028488482d079, type: 3}
m_Name: Farm
m_EditorClassIdentifier:
<<<<<<< HEAD
_sprite: {fileID: 21300000, guid: 9bd2451627165d44ab67ea16cdabaf2f, type: 3}
_yieldPrefab: {fileID: 6962989255644195630, guid: a2dc5d9672c10074fa9c35c12f6339c1, type: 3}
_yieldSpeed: 0.5
_randomPositionConfig: 0.5
=======
_sprite: {fileID: 21300000, guid: ccca3e050cb082b45af0a099790463f6, type: 3}
_yieldPrefab: {fileID: 0}
_yieldSpeed: 1
>>>>>>> origin/main