FIRST PROTOTYPE/ Updated IncidentSystem + repaired inventory

This commit is contained in:
Залетов Федор 2022-01-20 11:44:38 +03:00
parent c8c6f0c010
commit f9a81c0aad
47 changed files with 12512 additions and 8263 deletions

Binary file not shown.

View File

@ -0,0 +1,224 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1489782403959225786
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1489782403959225785}
- component: {fileID: 1489782403959225767}
- component: {fileID: 1489782403959225784}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1489782403959225785
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1489782403959225786}
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: 839375216723245710}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0.00044441, y: 0.00024509}
m_SizeDelta: {x: 161.32, y: 147.62}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1489782403959225767
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1489782403959225786}
m_CullTransparentMesh: 1
--- !u!114 &1489782403959225784
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1489782403959225786}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 5c823983cfaec90459cde31d1c98f1a9, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &8979752914845523868
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 839375216723245710}
- component: {fileID: 8463024123176930068}
- component: {fileID: 6945249212224501652}
- component: {fileID: 845954423796914200}
- component: {fileID: -2417682234430093969}
m_Layer: 5
m_Name: EquipmentButtonPrefab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &839375216723245710
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8979752914845523868}
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:
- {fileID: 1489782403959225785}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 512.1482, y: -132.72797}
m_SizeDelta: {x: 161.3217, y: 147.619}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8463024123176930068
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8979752914845523868}
m_CullTransparentMesh: 1
--- !u!114 &6945249212224501652
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8979752914845523868}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 1c5bb4d795a592b48a9500fdc8e9a61e, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &845954423796914200
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8979752914845523868}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_WrapAround: 0
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6945249212224501652}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: -2417682234430093969}
m_TargetAssemblyTypeName: EquipmentButton, Assembly-CSharp
m_MethodName: OnClick
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &-2417682234430093969
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8979752914845523868}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e7afda5f67c05cc4db52c953c6523a87, type: 3}
m_Name:
m_EditorClassIdentifier:
num: 0

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 16c35323e2f8bd545940e2b4536704e9
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -75,6 +75,54 @@ TextureImporter:
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: iPhone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []

View File

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 244 KiB

View File

Before

Width:  |  Height:  |  Size: 368 KiB

After

Width:  |  Height:  |  Size: 368 KiB

View File

@ -8,6 +8,12 @@ public class AddEquipment : MonoBehaviour
{
if (Inventory.main.EquipedOrNot(Inventory.main.lastCardNum))
{
GameObject[] _cards =
Inventory.main.allEquipment[Inventory.main.lastCardNum].GetComponent<Equipment>().equipmentConfig.equipmentCharacteristics.equipmentCards;
for (int j = 0; j < _cards.Length; j++)
{
DeckManager.main.DeletedCard(_cards[j]);
}
Inventory.main.playerEquipment.Remove(Inventory.main.allEquipment[Inventory.main.lastCardNum]);
for (int i = 0; i < Inventory.main.playerPlace.Count; i++)
{
@ -15,17 +21,31 @@ public class AddEquipment : MonoBehaviour
{
Inventory.main.playerPlace[i].image.sprite = Inventory.main.imagePlug;
Inventory.main.playerPlace[i].GetComponent<PlaceEquipment>().equipmentNum = -1;
Inventory.main.localplayerEquipment.Add(Inventory.main.allEquipment[Inventory.main.lastCardNum]);
try
{
Inventory.main.localplayerEquipment.Insert(Inventory.main.lastCardNum, Inventory.main.allEquipment[Inventory.main.lastCardNum]);
}
catch
{
Inventory.main.localplayerEquipment.Insert(Inventory.main.localplayerEquipment.Count, Inventory.main.allEquipment[Inventory.main.lastCardNum]);
}
Inventory.main.gameObject.GetComponent<SpawnButton>().InstantiateEquipmentButton(0, 9);
}
}
}
else
{
GameObject[] _cards =
Inventory.main.allEquipment[Inventory.main.lastCardNum].GetComponent<Equipment>().equipmentConfig.equipmentCharacteristics.equipmentCards;
for (int j = 0; j < _cards.Length; j++)
{
DeckManager.main.AddCard(_cards[j]);
}
Inventory.main.playerEquipment.Add(Inventory.main.allEquipment[Inventory.main.lastCardNum]);
Inventory.main.WhichPlace(Inventory.main.lastCardNum);
Inventory.main.localplayerEquipment.Remove(Inventory.main.allEquipment[Inventory.main.lastCardNum]);
Inventory.main.gameObject.GetComponent<SpawnButton>().InstantiateEquipmentButton(0, 9);
}
DataHolder.main.PlayerEquipment = Inventory.main.playerEquipment;

View File

@ -16,7 +16,7 @@ public class EquipmentInfo : MonoBehaviour
{
if (main != null && main != this)
{
Debug.LogWarning("2 dataholders on the scene");
Debug.LogWarning("2 equipmentinfo on the scene");
Destroy(this);
return;
}

View File

@ -19,17 +19,21 @@ public class Inventory : MonoBehaviour
private void Awake()
{
main = this;
if (DataHolder.main.AllEquipment.Count != 0)
if (main != null && main != this)
{
playerEquipment = DataHolder.main.PlayerEquipment;
allEquipment = DataHolder.main.AllEquipment;
Debug.LogWarning("2 inventory on the scene");
Destroy(this);
return;
}
main = this;
CheckData();
localplayerEquipment.AddRange(allEquipment);
}
public void CheckData()
{
playerEquipment = DataHolder.main.PlayerEquipment;
allEquipment = DataHolder.main.AllEquipment;
}
public bool EquipedOrNot(int _num)
{
for (int i = 0; i < playerEquipment.Count; i++)

View File

@ -11,8 +11,10 @@ public class PlaceEquipment : MonoBehaviour
public void EquipmentAbout()
{
//Óðàààààà, âñå ðàáîòàåò
Debug.Log("CLICK ONE");
if (GetComponentInChildren<Image>().sprite.name != Inventory.main.imagePlug.name && equipmentNum != -1)
{
Debug.Log("CLICK TWO");
Inventory.main.lastCardNum = equipmentNum;
EquipmentInfo.main.CardAbout(equipmentNum);
}

View File

@ -26,7 +26,10 @@ public class SpawnButton : MonoBehaviour
maxHeroButOnPage = maxHeroesInRow * maxHeroesInColumn;
InstantiateEquipmentButton(0, maxHeroButOnPage);
}
public void OnClick()
{
InstantiateEquipmentButton(0, 9);
}
public void ChangePage(int _page)
{
if ((page + _page) * maxHeroButOnPage - Inventory.main.localplayerEquipment.Count < 0)
@ -45,13 +48,13 @@ public class SpawnButton : MonoBehaviour
}
}
public void InstantiateEquipmentButton(int _begin, int _end)
public void InstantiateEquipmentButton(int _begin, int _end )
{
for (int i = 0; i < allButtonLinks.Count; i++)
{
Destroy(allButtonLinks[i]);
}
allButtonLinks.Clear();
for (int i = 0; i < parent.transform.childCount; i++)
{
Destroy(parent.transform.GetChild(i).gameObject);
}
float _x = 0;
float _y = 0;
@ -65,21 +68,29 @@ public class SpawnButton : MonoBehaviour
}
Button link = Instantiate(buttonPrefab, parent.transform);
link.transform.GetComponent<EquipmentButton>().num = i;
link.transform.localPosition = new Vector3(_x, _y, 0);
link.image.sprite = Inventory.main.localplayerEquipment[i].GetComponent<Equipment>().equipmentConfig.equipmentCharacteristics.sprite;
link.image.sprite = Inventory.main.localplayerEquipment[link.transform.GetComponent<EquipmentButton>().num].GetComponent<Equipment>().equipmentConfig.equipmentCharacteristics.sprite;
for (int j = 0; j < Inventory.main.allEquipment.Count; j++)
{
if (Inventory.main.allEquipment[j].GetComponent<Equipment>().equipmentConfig.equipmentCharacteristics.sprite == link.image.sprite)
{
link.transform.GetComponent<EquipmentButton>().num = j;
break;
}
}
_x += gameObject.GetComponent<RectTransform>().rect.width + distX;
_x += link.GetComponent<RectTransform>().rect.width + distX;
_counter += 1;
if (_counter % maxHeroesInRow == 0)
{
_x = 0;
_y -= gameObject.GetComponent<RectTransform>().rect.height + distY;
_y -= link.GetComponent<RectTransform>().rect.height + distY;
}
allButtonLinks.Add(link);
}
}
}

8
Assets/Music.meta Normal file
View File

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

Binary file not shown.

View File

@ -0,0 +1,22 @@
fileFormatVersion: 2
guid: 1004decef7fb5ea4da852311a4246561
AudioImporter:
externalObjects: {}
serializedVersion: 6
defaultSettings:
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
preloadAudioData: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -218,7 +218,7 @@ MonoBehaviour:
m_GameObject: {fileID: 8979752914845523868}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a8d6de62cca58794f9c98838556168c4, type: 3}
m_Script: {fileID: 11500000, guid: e7afda5f67c05cc4db52c953c6523a87, type: 3}
m_Name:
m_EditorClassIdentifier:
num: 0

View File

@ -1591,7 +1591,7 @@ MonoBehaviour:
'
toNode: 2
reward: {fileID: 0}
reward: {fileID: 6257004177646272206, guid: 20d7aac99a8890247b0f02dfffcd690d, type: 3}
damage: 0
- phrase: As soon as you opened the front door, you immediately saw a sniper rifle.
You were not embarrassed to climb into the center of the salon through dead
@ -1606,7 +1606,7 @@ MonoBehaviour:
you snatched it from the dead man's hands and walked away from the helicopter.
Unknown figures were approaching you
PlayerAnswer: []
reward: {fileID: 0}
reward: {fileID: 7537755910953202467, guid: e1a96cea4904bdb4ebacb21a79cad47b, type: 3}
damage: 0
_currentNode: 0
ShowDialogue: 1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 7f7cf1336562d5541a6b68e94a57e257
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -133,6 +133,8 @@ GameObject:
m_Component:
- component: {fileID: 1821969147}
- component: {fileID: 1821969146}
- component: {fileID: 1821969148}
- component: {fileID: 1821969149}
m_Layer: 0
m_Name: DataHolder
m_TagString: Untagged
@ -165,7 +167,8 @@ MonoBehaviour:
- {fileID: 11400000, guid: 1ddd96264d0ff474fb1b38acae40b69f, type: 2}
- {fileID: 11400000, guid: f978d621347647a4f8505449e105298e, type: 2}
PlayerEquipment: []
AllEquipment: []
AllEquipment:
- {fileID: 4068511147674530333, guid: ca90993e80150994e905b83ffd525f53, type: 3}
mission: {fileID: 0}
_currentScene: MainMenu
warning: 1
@ -183,3 +186,107 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!82 &1821969148
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1821969145}
m_Enabled: 0
serializedVersion: 4
OutputAudioMixerGroup: {fileID: 0}
m_audioClip: {fileID: 8300000, guid: 1004decef7fb5ea4da852311a4246561, type: 3}
m_PlayOnAwake: 1
m_Volume: 1
m_Pitch: 1
Loop: 1
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!81 &1821969149
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1821969145}
m_Enabled: 0

View File

@ -88,6 +88,7 @@ public class Card : MonoBehaviour
var _card = cardConfig.CardCharacteristics;
//ВАРНИНГ! НЕ РАБОТАЕТ С КАРТАМИ НА -ЗДОРОВЬЕ!!
int _stamina = DeckManager.main.stamina;
if (_stamina < cardConfig.CardCharacteristics.quantityStamina) return;
if (_card.specialization == Specialization.healing)
{
if (_card.addStamina > 0)
@ -109,7 +110,7 @@ public class Card : MonoBehaviour
DestroyObject();
return;
}
else if (_stamina >= cardConfig.CardCharacteristics.quantityStamina)
else
{
DeckManager.main.currentCard = cardConfig;
DeckManager.main.numberCurrentCard = number;

View File

@ -20,7 +20,6 @@ public class DataHolder : MonoBehaviour
private int score = 10;
private int missionChecker;
public enum complexityLevels
{
@ -112,7 +111,7 @@ public class DataHolder : MonoBehaviour
public void NewMission(MissionConfig _mission)
{
mission = _mission;
missionChecker = 0;
}

View File

@ -16,7 +16,10 @@ public class DeckManager : MonoBehaviour
[Header("Stamina")]
[SerializeField] private List<Image> staminaCells = new List<Image>();
[HideInInspector] public int stamina;
[SerializeField] private GameObject firstCard;
[SerializeField] private GameObject firstEquip;
[SerializeField] private GameObject secondCard;
[SerializeField] private GameObject secondEquip;
public bool waitingEnemyTurn = false;
private void Awake()
@ -35,8 +38,36 @@ public class DeckManager : MonoBehaviour
stamina = 3;
CompletionDeck();
HandingOut();
for (int i = 0; i < DataHolder.main.PlayerEquipment.Count; i++)
{
var _equipmentCharacter =
DataHolder.main.PlayerEquipment[i].GetComponent<Equipment>().equipmentConfig.equipmentCharacteristics;
if (_equipmentCharacter.equipmentCards.Length != 0)
{
for (int j = 0; j < _equipmentCharacter.equipmentCards.Length; j++)
{
AddCard(_equipmentCharacter.equipmentCards[i]);
}
}
}
}
public void AddCard(GameObject card)
{
deck.Add(card);
}
public void DeletedCard(GameObject card)
{
for (int i = 0; i < deck.Count; i++)
{
if (deck[i] == card)
{
deck.RemoveAt(i);
return;
}
}
Debug.LogWarning("No card found to delete");
}
public void HandingOut()
{
@ -64,6 +95,8 @@ public class DeckManager : MonoBehaviour
public void NewStaminaQuantity(int q)
{
stamina = q;
if (stamina > 3) stamina = 3;
for (int i = 0; i < 3; i++)
{
if (i < stamina)
@ -143,7 +176,6 @@ public class DeckManager : MonoBehaviour
if (currentCard.CardCharacteristics.damage > 0)
{
print(1);
enemy.ChangeHp(currentCard.CardCharacteristics.damage);
}
else if (currentCard.CardCharacteristics.addHealth > 0)

View File

@ -9,7 +9,6 @@ public class AnswerButton : MonoBehaviour
public int phaseIndex;
public void OnClick()
{
Debug.Log("CLICK! " + phaseIndex);
currentIncident.NewPhrase(phaseIndex);
}
}

View File

@ -26,14 +26,18 @@ public class IncidentSystem : MonoBehaviour
}
public void NewPhrase(int _phraseIndex)
{
Debug.Log("NEW PHASE! " + _phraseIndex);
if (ShowDialogue == false) CloseTab();
Player.main.ChangeHp(node[_phraseIndex].damage);
for (int i = 0; i < answerButtons.Length; i++)
{
answerButtons[i].gameObject.SetActive(false);
}
if (node[_phraseIndex].reward != null)
{
DataHolder.main.AddEquipmentToPlayerInventory(node[_phraseIndex].reward);
}
textArea.text = node[_phraseIndex].phrase;
if (node[_phraseIndex].PlayerAnswer.Length == 0)
{
@ -48,10 +52,7 @@ public class IncidentSystem : MonoBehaviour
answerButtons[j].gameObject.SetActive(true);
answerButtons[j].GetComponentInChildren<Text>().text = node[_phraseIndex].PlayerAnswer[i].text;
answerButtons[j].GetComponent<AnswerButton>().phaseIndex = node[_phraseIndex].PlayerAnswer[i].toNode;
if (node[_phraseIndex].reward != null)
{
DataHolder.main.AddEquipmentToPlayerInventory(node[_phraseIndex].reward);
}
j++;
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -819,3 +819,13 @@ C# parse time : 237ms
candidates check time : 40ms
console write time : 0ms
[api-updater (non-obsolete-error-filter)] 20.01.2022 9:56:02 : Starting C:/Program Files/Unity/Hub/Editor/2020.3.19f1/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
[api-updater (non-obsolete-error-filter)]
----------------------------------
jit/startup time : 1221,735ms
moved types parse time: 56ms
candidates parse time : 1ms
C# parse time : 307ms
candidates check time : 53ms
console write time : 0ms

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -56,8 +56,8 @@ PlayerSettings:
androidShowActivityIndicatorOnLoading: -1
iosUseCustomAppBackgroundBehavior: 0
iosAllowHTTPDownload: 1
allowedAutorotateToPortrait: 1
allowedAutorotateToPortraitUpsideDown: 1
allowedAutorotateToPortrait: 0
allowedAutorotateToPortraitUpsideDown: 0
allowedAutorotateToLandscapeRight: 1
allowedAutorotateToLandscapeLeft: 1
useOSAutorotation: 1
@ -152,7 +152,8 @@ PlayerSettings:
resolutionScalingMode: 0
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier: {}
applicationIdentifier:
Android: com.DefaultCompany.Project_omega
buildNumber:
Standalone: 0
iPhone: 0