plantilla base para movimiento básico
This commit is contained in:
Robii Aragon
2026-02-05 05:07:55 -08:00
parent ed7b223c04
commit fd87a6ffd5
14441 changed files with 13711084 additions and 20 deletions

View File

@@ -0,0 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class vendorCategorySlotPanel : MonoBehaviour
{
public vendorCategorySlotPanelInfo mainVendorCategorySlotPanelInfo;
}

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 0addd1e5e64ae974bbcb739640e119a3
timeCreated: 1565077394
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Vendor System/vendorCategorySlotPanel.cs
uploadId: 814740

View File

@@ -0,0 +1,17 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
[System.Serializable]
public class vendorCategorySlotPanelInfo
{
public string Name;
public Text categoryNameText;
public RawImage categoryIcon;
public Button button;
public GameObject pressedIcon;
}

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: c6a8f11f3db66be4787de1b4be2ba08e
timeCreated: 1565077290
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Vendor System/vendorCategorySlotPanelInfo.cs
uploadId: 814740

View File

@@ -0,0 +1,8 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class vendorObjectSlotPanel : MonoBehaviour
{
public vendorObjectSlotPanelInfo mainVendorObjectSlotPanelInfo;
}

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: a4893344791c1284fb3fd5528f043cbe
timeCreated: 1564906795
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Vendor System/vendorObjectSlotPanel.cs
uploadId: 814740

View File

@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
[System.Serializable]
public class vendorObjectSlotPanelInfo
{
public string Name;
public string categoryName;
public Button button;
public Text objectNameText;
public Text objectAmountAvailableText;
public Text objectPriceText;
public GameObject pressedIcon;
public Text objectLevelText;
}

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: c0d4740ca427346438687d401773bcae
timeCreated: 1565076502
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Vendor System/vendorObjectSlotPanelInfo.cs
uploadId: 814740

View File

@@ -0,0 +1,186 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class vendorSystem : MonoBehaviour
{
public List<inventoryListElement> inventoryListManagerList = new List<inventoryListElement> ();
public List<inventoryInfo> vendorInventoryList = new List<inventoryInfo> ();
public string[] inventoryManagerListString;
public List<inventoryManagerStringInfo> inventoryManagerStringInfoList = new List<inventoryManagerStringInfo> ();
public bool useGeneralBuyPriceMultiplier;
public float generalBuyPriceMultiplayerPercentage;
public bool useGeneralSellPriceMultiplier;
public float generalSellPriceMultiplayerPercentage;
public bool infiniteVendorAmountAvailable;
public inventoryListManager mainInventoryManager;
public gameManager gameSystemManager;
public bool loadCurrentVendorInventoryFromSaveFile;
public bool saveCurrentVendorInventoryToSaveFile;
public void setNewInventoryListManagerList (List<inventoryListElement> newList)
{
inventoryListManagerList = newList;
}
void Start ()
{
setInventoryFromInventoryListManager ();
}
public void setInventoryFromInventoryListManager ()
{
List<inventoryCategoryInfo> inventoryCategoryInfoList = mainInventoryManager.inventoryCategoryInfoList;
int inventoryListManagerListCount = inventoryListManagerList.Count;
for (int i = 0; i < inventoryListManagerListCount; i++) {
inventoryListElement currentElement = inventoryListManagerList [i];
if (currentElement.addObjectToList) {
inventoryInfo currentInventoryInfo =
inventoryCategoryInfoList [currentElement.categoryIndex].inventoryList [currentElement.elementIndex];
if (currentInventoryInfo != null) {
inventoryInfo newInventoryInfo = new inventoryInfo (currentInventoryInfo);
newInventoryInfo.Name = currentInventoryInfo.Name;
newInventoryInfo.amount = currentElement.amount;
float buyPrice = currentElement.vendorPrice;
if (useGeneralBuyPriceMultiplier) {
buyPrice = currentInventoryInfo.vendorPrice * generalBuyPriceMultiplayerPercentage;
}
newInventoryInfo.vendorPrice = buyPrice;
float sellPrice = currentElement.sellPrice;
if (useGeneralBuyPriceMultiplier) {
sellPrice = currentInventoryInfo.sellPrice * generalSellPriceMultiplayerPercentage;
}
newInventoryInfo.sellPrice = sellPrice;
newInventoryInfo.infiniteVendorAmountAvailable =
infiniteVendorAmountAvailable ||
currentElement.infiniteAmount ||
currentElement.infiniteVendorAmountAvailable;
if (currentElement.useMinLevelToBuy) {
newInventoryInfo.useMinLevelToBuy = true;
newInventoryInfo.minLevelToBuy = currentElement.minLevelToBuy;
}
newInventoryInfo.spawnObject = currentElement.spawnObject;
vendorInventoryList.Add (newInventoryInfo);
}
}
}
}
public List<inventoryInfo> getVendorInventoryList ()
{
return vendorInventoryList;
}
public void setVendorInventoryList (List<inventoryInfo> newVendorInventoryList)
{
vendorInventoryList = new List<inventoryInfo> (newVendorInventoryList);
}
public void getInventoryListManagerList ()
{
inventoryManagerListString = new string[mainInventoryManager.inventoryCategoryInfoList.Count];
for (int i = 0; i < inventoryManagerListString.Length; i++) {
inventoryManagerListString [i] = mainInventoryManager.inventoryCategoryInfoList [i].Name;
}
inventoryManagerStringInfoList.Clear ();
for (int i = 0; i < mainInventoryManager.inventoryCategoryInfoList.Count; i++) {
inventoryManagerStringInfo newInventoryManagerStringInfoo = new inventoryManagerStringInfo ();
newInventoryManagerStringInfoo.Name = mainInventoryManager.inventoryCategoryInfoList [i].Name;
newInventoryManagerStringInfoo.inventoryManagerListString = new string[mainInventoryManager.inventoryCategoryInfoList [i].inventoryList.Count];
for (int j = 0; j < mainInventoryManager.inventoryCategoryInfoList [i].inventoryList.Count; j++) {
string newName = mainInventoryManager.inventoryCategoryInfoList [i].inventoryList [j].Name;
newInventoryManagerStringInfoo.inventoryManagerListString [j] = newName;
}
inventoryManagerStringInfoList.Add (newInventoryManagerStringInfoo);
}
updateComponent ();
}
public void setInventoryObjectListNames ()
{
for (int i = 0; i < inventoryListManagerList.Count; i++) {
inventoryListManagerList [i].Name = inventoryListManagerList [i].inventoryObjectName;
}
updateComponent ();
}
public void addNewInventoryObjectToInventoryListManagerList ()
{
inventoryListElement newInventoryListElement = new inventoryListElement ();
newInventoryListElement.Name = "New Object";
inventoryListManagerList.Add (newInventoryListElement);
updateComponent ();
}
public void saveCurrentVendorListToFile ()
{
bool mainGameManagerLocated = gameSystemManager != null;
if (!mainGameManagerLocated) {
gameSystemManager = gameManager.Instance;
mainGameManagerLocated = gameSystemManager != null;
}
if (!mainGameManagerLocated) {
gameSystemManager = FindObjectOfType<gameManager> ();
gameSystemManager.getComponentInstanceOnApplicationPlaying ();
mainGameManagerLocated = gameSystemManager != null;
}
if (mainGameManagerLocated) {
gameSystemManager.saveGameInfoFromEditor ("Vendor");
print ("Inventory Vendor List Saved");
updateComponent ();
}
}
public void updateComponent ()
{
GKC_Utils.updateComponent (this);
GKC_Utils.updateDirtyScene ("Updating main vendor system ", gameObject);
}
[System.Serializable]
public class inventoryManagerStringInfo
{
public string Name;
public string[] inventoryManagerListString;
}
}

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: a2b64ef97965d1748a455491b0e5af81
timeCreated: 1564999426
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Vendor System/vendorSystem.cs
uploadId: 814740

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,19 @@
fileFormatVersion: 2
guid: 7d6690b3c6297f746bd43d5d4fa84c90
timeCreated: 1564907486
licenseType: Store
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 40995
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
packageVersion: 3.77g
assetPath: Assets/Game Kit Controller/Scripts/Vendor System/vendorUISystem.cs
uploadId: 814740