first commit
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f204c61df8aefbf72a0d2d40f00aa2c8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,776 @@
|
||||
using System.IO;
|
||||
using UnityEditor;
|
||||
using UnityEditor.SceneManagement;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public static class Lab4SceneBuilder
|
||||
{
|
||||
private const string ScriptsPath = "Assets/_Scripts";
|
||||
private const string DataPath = "Assets/_Data";
|
||||
private const string DialoguePath = "Assets/_Data/Dialogue";
|
||||
private const string ItemsPath = "Assets/_Data/Items";
|
||||
private const string PrefabsPath = "Assets/_Prefabs";
|
||||
private const string ScenesPath = "Assets/_Scenes";
|
||||
private const string MaterialsPath = "Assets/_Materials";
|
||||
private const string FontsPath = "Assets/_Fonts";
|
||||
private const string ScenePath = "Assets/_Scenes/Lab04_DialogueSystem.unity";
|
||||
private const string ResponseButtonPrefabPath = "Assets/_Prefabs/DialogueResponseButton.prefab";
|
||||
|
||||
[MenuItem("Tools/Technical Game Design/Lab4/Create Dialogue System Scene")]
|
||||
public static void CreateDialogueSystemScene()
|
||||
{
|
||||
CreateFolders();
|
||||
Font regularFont = InstallUbuntuFont();
|
||||
MaterialLibrary materials = CreateMaterials();
|
||||
ItemLibrary items = CreateItems();
|
||||
DialogueLibrary dialogue = CreateDialogue(items);
|
||||
CreateGraphReadme();
|
||||
GameObject responseButtonPrefab = CreateResponseButtonPrefab(regularFont);
|
||||
|
||||
Scene scene = EditorSceneManager.NewScene(NewSceneSetup.EmptyScene, NewSceneMode.Single);
|
||||
scene.name = "Lab04_DialogueSystem";
|
||||
|
||||
BuildScene(materials, items, dialogue, responseButtonPrefab, regularFont);
|
||||
|
||||
EditorSceneManager.SaveScene(scene, ScenePath);
|
||||
AssetDatabase.SaveAssets();
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
Debug.Log("Lab04 dialogue system scene generated: " + ScenePath);
|
||||
}
|
||||
|
||||
private static void CreateFolders()
|
||||
{
|
||||
string[] paths =
|
||||
{
|
||||
ScriptsPath, DataPath, DialoguePath, ItemsPath, PrefabsPath,
|
||||
ScenesPath, MaterialsPath, FontsPath, "Assets/Editor"
|
||||
};
|
||||
|
||||
foreach (string path in paths)
|
||||
Directory.CreateDirectory(path);
|
||||
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
|
||||
private static Font InstallUbuntuFont()
|
||||
{
|
||||
string regularDestination = FontsPath + "/Ubuntu-Regular.ttf";
|
||||
string boldDestination = FontsPath + "/Ubuntu-Bold.ttf";
|
||||
|
||||
string regularSource = FindFirstExistingFile(
|
||||
"/usr/share/fonts/truetype/ubuntu/Ubuntu-Regular.ttf",
|
||||
"/usr/share/fonts/truetype/ubuntu/Ubuntu-R.ttf",
|
||||
"/usr/share/fonts/TTF/Ubuntu-Regular.ttf",
|
||||
"/usr/share/fonts/TTF/Ubuntu-R.ttf",
|
||||
"/usr/share/fonts/Ubuntu-Regular.ttf",
|
||||
"/usr/share/fonts/Ubuntu-R.ttf");
|
||||
|
||||
string boldSource = FindFirstExistingFile(
|
||||
"/usr/share/fonts/truetype/ubuntu/Ubuntu-Bold.ttf",
|
||||
"/usr/share/fonts/truetype/ubuntu/Ubuntu-B.ttf",
|
||||
"/usr/share/fonts/TTF/Ubuntu-Bold.ttf",
|
||||
"/usr/share/fonts/TTF/Ubuntu-B.ttf",
|
||||
"/usr/share/fonts/Ubuntu-Bold.ttf",
|
||||
"/usr/share/fonts/Ubuntu-B.ttf");
|
||||
|
||||
if (!string.IsNullOrEmpty(regularSource))
|
||||
File.Copy(regularSource, regularDestination, true);
|
||||
else
|
||||
Debug.LogWarning("Ubuntu font was not found in common Linux font folders. Falling back to built-in Arial.");
|
||||
|
||||
if (!string.IsNullOrEmpty(boldSource))
|
||||
File.Copy(boldSource, boldDestination, true);
|
||||
|
||||
if (File.Exists(regularDestination))
|
||||
AssetDatabase.ImportAsset(regularDestination);
|
||||
|
||||
if (File.Exists(boldDestination))
|
||||
AssetDatabase.ImportAsset(boldDestination);
|
||||
AssetDatabase.Refresh();
|
||||
|
||||
Font font = AssetDatabase.LoadAssetAtPath<Font>(regularDestination);
|
||||
return font != null ? font : Resources.GetBuiltinResource<Font>("Arial.ttf");
|
||||
}
|
||||
|
||||
private static string FindFirstExistingFile(params string[] candidates)
|
||||
{
|
||||
foreach (string candidate in candidates)
|
||||
{
|
||||
if (File.Exists(candidate))
|
||||
return candidate;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static MaterialLibrary CreateMaterials()
|
||||
{
|
||||
MaterialLibrary library = new MaterialLibrary
|
||||
{
|
||||
ground = CreateMaterial("Ground_Mat", new Color(0.34f, 0.43f, 0.34f)),
|
||||
player = CreateMaterial("Player_Mat", new Color(0.17f, 0.43f, 0.74f)),
|
||||
npc = CreateMaterial("NPC_Mat", new Color(0.68f, 0.44f, 0.17f)),
|
||||
pass = CreateMaterial("VillagePass_Mat", new Color(0.95f, 0.78f, 0.25f)),
|
||||
prop = CreateMaterial("Props_Mat", new Color(0.42f, 0.34f, 0.25f)),
|
||||
accent = CreateMaterial("Accent_Mat", new Color(0.14f, 0.62f, 0.75f)),
|
||||
interactionZone = CreateMaterial("InteractionZone_Mat", new Color(0.25f, 0.75f, 1f, 0.22f), true)
|
||||
};
|
||||
|
||||
return library;
|
||||
}
|
||||
|
||||
private static Material CreateMaterial(string name, Color color, bool transparent = false)
|
||||
{
|
||||
string path = MaterialsPath + "/" + name + ".mat";
|
||||
Material material = AssetDatabase.LoadAssetAtPath<Material>(path);
|
||||
|
||||
if (material == null)
|
||||
{
|
||||
material = new Material(Shader.Find("Standard"));
|
||||
AssetDatabase.CreateAsset(material, path);
|
||||
}
|
||||
|
||||
material.name = name;
|
||||
material.color = color;
|
||||
|
||||
if (transparent)
|
||||
{
|
||||
material.SetFloat("_Mode", 3f);
|
||||
material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.SrcAlpha);
|
||||
material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.OneMinusSrcAlpha);
|
||||
material.SetInt("_ZWrite", 0);
|
||||
material.DisableKeyword("_ALPHATEST_ON");
|
||||
material.EnableKeyword("_ALPHABLEND_ON");
|
||||
material.DisableKeyword("_ALPHAPREMULTIPLY_ON");
|
||||
material.renderQueue = 3000;
|
||||
}
|
||||
else
|
||||
{
|
||||
material.SetFloat("_Mode", 0f);
|
||||
material.SetInt("_SrcBlend", (int)UnityEngine.Rendering.BlendMode.One);
|
||||
material.SetInt("_DstBlend", (int)UnityEngine.Rendering.BlendMode.Zero);
|
||||
material.SetInt("_ZWrite", 1);
|
||||
material.DisableKeyword("_ALPHATEST_ON");
|
||||
material.DisableKeyword("_ALPHABLEND_ON");
|
||||
material.DisableKeyword("_ALPHAPREMULTIPLY_ON");
|
||||
material.renderQueue = -1;
|
||||
}
|
||||
|
||||
EditorUtility.SetDirty(material);
|
||||
return material;
|
||||
}
|
||||
|
||||
private static ItemLibrary CreateItems()
|
||||
{
|
||||
ItemLibrary library = new ItemLibrary
|
||||
{
|
||||
villagePass = LoadOrCreateAsset<ItemData>(ItemsPath + "/VillagePass.asset"),
|
||||
oldAmulet = LoadOrCreateAsset<ItemData>(ItemsPath + "/OldAmulet.asset")
|
||||
};
|
||||
|
||||
library.villagePass.itemId = "VillagePass";
|
||||
library.villagePass.itemName = "Пропуск";
|
||||
library.villagePass.description = "Временный документ для прохода к старосте.";
|
||||
library.villagePass.itemColor = new Color(0.95f, 0.78f, 0.25f);
|
||||
library.villagePass.maxStack = 1;
|
||||
|
||||
library.oldAmulet.itemId = "OldAmulet";
|
||||
library.oldAmulet.itemName = "Старый амулет";
|
||||
library.oldAmulet.description = "Потёртый амулет, который ценит смотритель ворот.";
|
||||
library.oldAmulet.itemColor = new Color(0.35f, 0.82f, 0.8f);
|
||||
library.oldAmulet.maxStack = 1;
|
||||
|
||||
EditorUtility.SetDirty(library.villagePass);
|
||||
EditorUtility.SetDirty(library.oldAmulet);
|
||||
AssetDatabase.SaveAssets();
|
||||
return library;
|
||||
}
|
||||
|
||||
private static DialogueLibrary CreateDialogue(ItemLibrary items)
|
||||
{
|
||||
DialogueLibrary library = new DialogueLibrary
|
||||
{
|
||||
start = LoadOrCreateAsset<DialogueNode>(DialoguePath + "/StartNode.asset"),
|
||||
newcomer = LoadOrCreateAsset<DialogueNode>(DialoguePath + "/Node_Newcomer.asset"),
|
||||
passInfo = LoadOrCreateAsset<DialogueNode>(DialoguePath + "/Node_PassInfo.asset"),
|
||||
noPassWarning = LoadOrCreateAsset<DialogueNode>(DialoguePath + "/Node_NoPassWarning.asset"),
|
||||
hasPass = LoadOrCreateAsset<DialogueNode>(DialoguePath + "/Node_HasPass.asset"),
|
||||
work = LoadOrCreateAsset<DialogueNode>(DialoguePath + "/Node_Work.asset"),
|
||||
reward = LoadOrCreateAsset<DialogueNode>(DialoguePath + "/Node_Reward.asset"),
|
||||
amuletComplete = LoadOrCreateAsset<DialogueNode>(DialoguePath + "/Node_AmuletQuestComplete.asset"),
|
||||
goodbye = LoadOrCreateAsset<DialogueNode>(DialoguePath + "/Node_Goodbye.asset")
|
||||
};
|
||||
|
||||
SetupNode(library.start, "StartNode", "Смотритель ворот", "Приветствую, путник. Ты впервые в нашем поселении?", false,
|
||||
Response("Да, я только пришёл.", library.newcomer),
|
||||
Response("Я ищу работу.", library.work),
|
||||
Response("Мне пора.", library.goodbye));
|
||||
|
||||
SetupNode(library.newcomer, "Node_Newcomer", "Смотритель ворот", "Тогда тебе понадобится пропуск. Без него стража не пустит тебя к старосте.", false,
|
||||
Response("Где его получить?", library.passInfo),
|
||||
Response("У меня уже есть пропуск.", library.hasPass, requiredItem: items.villagePass, unavailableText: "Нужен предмет: Пропуск"),
|
||||
Response("Понятно.", library.goodbye));
|
||||
|
||||
SetupNode(library.passInfo, "Node_PassInfo", "Смотритель ворот", "Осмотри площадку рядом с воротами. Иногда там оставляют временные пропуска.", false,
|
||||
Response("Спасибо, я поищу.", library.goodbye),
|
||||
Response("Я лучше сразу пойду к старосте.", library.noPassWarning));
|
||||
|
||||
SetupNode(library.noPassWarning, "Node_NoPassWarning", "Смотритель ворот", "Без пропуска тебя не примут. Сначала найди документ.", false,
|
||||
Response("Хорошо, найду пропуск.", library.goodbye));
|
||||
|
||||
SetupNode(library.hasPass, "Node_HasPass", "Смотритель ворот", "Отлично. Раз у тебя есть пропуск, можешь пройти дальше. Передай старосте, что я тебя направил.", false,
|
||||
Response("Спасибо за помощь.", library.reward, rewardItem: items.oldAmulet, rewardAmount: 1, eventId: "Gatekeeper_Rewards_Amulet"),
|
||||
Response("До встречи.", library.goodbye));
|
||||
|
||||
SetupNode(library.work, "Node_Work", "Смотритель ворот", "Работа есть. Принеси старый амулет, и я расскажу больше.", false,
|
||||
Response("У меня есть амулет.", library.amuletComplete, requiredItem: items.oldAmulet, consumeRequiredItem: true, unavailableText: "Нужен предмет: Старый амулет", eventId: "Gatekeeper_Amulet_TurnedIn"),
|
||||
Response("Я вернусь позже.", library.goodbye));
|
||||
|
||||
SetupNode(library.reward, "Node_Reward", "Смотритель ворот", "Возьми этот старый амулет. Он может пригодиться в разговоре о работе.", false,
|
||||
Response("Благодарю.", library.goodbye));
|
||||
|
||||
SetupNode(library.amuletComplete, "Node_AmuletQuestComplete", "Смотритель ворот", "Ты справился. Теперь я доверяю тебе. Для следующего задания приходи позже.", false,
|
||||
Response("Понял.", library.goodbye));
|
||||
|
||||
SetupNode(library.goodbye, "Node_Goodbye", "Смотритель ворот", "Удачи тебе.", true);
|
||||
|
||||
AssetDatabase.SaveAssets();
|
||||
return library;
|
||||
}
|
||||
|
||||
private static DialogueResponse Response(
|
||||
string text,
|
||||
DialogueNode nextNode,
|
||||
bool endsDialogue = false,
|
||||
ItemData requiredItem = null,
|
||||
int requiredItemAmount = 1,
|
||||
string unavailableText = "",
|
||||
bool hideIfRequirementsNotMet = false,
|
||||
bool consumeRequiredItem = false,
|
||||
ItemData rewardItem = null,
|
||||
int rewardAmount = 0,
|
||||
string eventId = "")
|
||||
{
|
||||
return new DialogueResponse
|
||||
{
|
||||
responseText = text,
|
||||
nextNode = nextNode,
|
||||
endsDialogue = endsDialogue,
|
||||
requiredItem = requiredItem,
|
||||
requiredItemAmount = Mathf.Max(1, requiredItemAmount),
|
||||
unavailableText = unavailableText,
|
||||
hideIfRequirementsNotMet = hideIfRequirementsNotMet,
|
||||
consumeRequiredItem = consumeRequiredItem,
|
||||
rewardItem = rewardItem,
|
||||
rewardAmount = rewardAmount,
|
||||
eventId = eventId
|
||||
};
|
||||
}
|
||||
|
||||
private static void SetupNode(DialogueNode node, string id, string speaker, string line, bool isEnd, params DialogueResponse[] responses)
|
||||
{
|
||||
node.nodeId = id;
|
||||
node.speakerName = speaker;
|
||||
node.npcLine = line;
|
||||
node.isEndNode = isEnd;
|
||||
node.responses = responses;
|
||||
node.editorNote = "Generated by Lab4SceneBuilder.";
|
||||
EditorUtility.SetDirty(node);
|
||||
}
|
||||
|
||||
private static T LoadOrCreateAsset<T>(string path) where T : ScriptableObject
|
||||
{
|
||||
T asset = AssetDatabase.LoadAssetAtPath<T>(path);
|
||||
if (asset != null)
|
||||
return asset;
|
||||
|
||||
asset = ScriptableObject.CreateInstance<T>();
|
||||
AssetDatabase.CreateAsset(asset, path);
|
||||
return asset;
|
||||
}
|
||||
|
||||
private static void CreateGraphReadme()
|
||||
{
|
||||
const string text =
|
||||
"StartNode\n" +
|
||||
"├─ Да, я только пришёл → Node_Newcomer\n" +
|
||||
"│ ├─ Где его получить? → Node_PassInfo → Node_Goodbye\n" +
|
||||
"│ ├─ У меня уже есть пропуск [requires VillagePass] → Node_HasPass → Node_Reward [gives OldAmulet] → Node_Goodbye\n" +
|
||||
"│ └─ Понятно → Node_Goodbye\n" +
|
||||
"├─ Я ищу работу → Node_Work\n" +
|
||||
"│ ├─ У меня есть амулет [requires OldAmulet, consumes] → Node_AmuletQuestComplete → Node_Goodbye\n" +
|
||||
"│ └─ Я вернусь позже → Node_Goodbye\n" +
|
||||
"└─ Мне пора → Node_Goodbye\n";
|
||||
|
||||
File.WriteAllText(DialoguePath + "/DialogueGraph_Readme.txt", text);
|
||||
}
|
||||
|
||||
private static GameObject CreateResponseButtonPrefab(Font font)
|
||||
{
|
||||
GameObject root = new GameObject("DialogueResponseButton", typeof(RectTransform), typeof(Image), typeof(Button), typeof(LayoutElement), typeof(Outline));
|
||||
RectTransform rect = root.GetComponent<RectTransform>();
|
||||
rect.sizeDelta = new Vector2(0f, 38f);
|
||||
|
||||
Image image = root.GetComponent<Image>();
|
||||
image.color = new Color(0.095f, 0.12f, 0.15f, 0.98f);
|
||||
|
||||
Outline outline = root.GetComponent<Outline>();
|
||||
outline.effectColor = new Color(0.36f, 0.48f, 0.54f, 0.28f);
|
||||
outline.effectDistance = new Vector2(1f, -1f);
|
||||
|
||||
Button button = root.GetComponent<Button>();
|
||||
ColorBlock colors = button.colors;
|
||||
colors.normalColor = new Color(0.095f, 0.12f, 0.15f, 0.98f);
|
||||
colors.highlightedColor = new Color(0.16f, 0.26f, 0.31f, 1f);
|
||||
colors.pressedColor = new Color(0.08f, 0.42f, 0.52f, 1f);
|
||||
colors.disabledColor = new Color(0.12f, 0.13f, 0.15f, 0.88f);
|
||||
button.colors = colors;
|
||||
|
||||
LayoutElement layout = root.GetComponent<LayoutElement>();
|
||||
layout.minHeight = 36f;
|
||||
layout.preferredHeight = 38f;
|
||||
|
||||
Text label = CreateText("Text", root.transform, font, "Ответ", 17, FontStyle.Normal, Color.white, TextAnchor.MiddleLeft);
|
||||
label.resizeTextForBestFit = true;
|
||||
label.resizeTextMinSize = 12;
|
||||
label.resizeTextMaxSize = 17;
|
||||
label.horizontalOverflow = HorizontalWrapMode.Wrap;
|
||||
label.verticalOverflow = VerticalWrapMode.Truncate;
|
||||
RectTransform labelRect = label.GetComponent<RectTransform>();
|
||||
labelRect.anchorMin = Vector2.zero;
|
||||
labelRect.anchorMax = Vector2.one;
|
||||
labelRect.offsetMin = new Vector2(18f, 4f);
|
||||
labelRect.offsetMax = new Vector2(-18f, -4f);
|
||||
|
||||
GameObject prefab = PrefabUtility.SaveAsPrefabAsset(root, ResponseButtonPrefabPath);
|
||||
Object.DestroyImmediate(root);
|
||||
return prefab;
|
||||
}
|
||||
|
||||
private static void BuildScene(MaterialLibrary materials, ItemLibrary items, DialogueLibrary dialogue, GameObject responseButtonPrefab, Font font)
|
||||
{
|
||||
CreateLighting();
|
||||
CreateGroundAndProps(materials);
|
||||
|
||||
SimplePlayerController playerController = CreatePlayer(materials.player);
|
||||
Inventory inventory = playerController.GetComponent<Inventory>();
|
||||
|
||||
Canvas canvas = CreateCanvas();
|
||||
DialogueManager dialogueManager = CreateDialogueUi(canvas.transform, font, responseButtonPrefab, inventory, playerController);
|
||||
DialogueHUD hud = CreateHud(canvas.transform, font, inventory, dialogueManager);
|
||||
|
||||
dialogueManager.hintText = hud.hintText;
|
||||
dialogueManager.statusText = hud.statusText;
|
||||
|
||||
CreateNpc(dialogue.start, dialogueManager, materials, font);
|
||||
CreatePickup(items.villagePass, inventory, materials.pass);
|
||||
CreateEventSystem();
|
||||
|
||||
ApplyFontToAllText(canvas.transform, font);
|
||||
}
|
||||
|
||||
private static void CreateLighting()
|
||||
{
|
||||
GameObject lightObject = new GameObject("Directional Light");
|
||||
Light light = lightObject.AddComponent<Light>();
|
||||
light.type = LightType.Directional;
|
||||
light.intensity = 1.15f;
|
||||
light.shadows = LightShadows.Soft;
|
||||
lightObject.transform.rotation = Quaternion.Euler(48f, -35f, 0f);
|
||||
|
||||
RenderSettings.ambientMode = UnityEngine.Rendering.AmbientMode.Flat;
|
||||
RenderSettings.ambientLight = new Color(0.42f, 0.45f, 0.48f);
|
||||
}
|
||||
|
||||
private static void CreateGroundAndProps(MaterialLibrary materials)
|
||||
{
|
||||
GameObject ground = GameObject.CreatePrimitive(PrimitiveType.Plane);
|
||||
ground.name = "Training Ground";
|
||||
ground.transform.localScale = new Vector3(4f, 1f, 4f);
|
||||
ground.GetComponent<Renderer>().sharedMaterial = materials.ground;
|
||||
|
||||
CreateCube("Gate Left Post", new Vector3(-2.2f, 1.25f, 5.5f), new Vector3(0.35f, 2.5f, 0.35f), materials.prop);
|
||||
CreateCube("Gate Right Post", new Vector3(2.2f, 1.25f, 5.5f), new Vector3(0.35f, 2.5f, 0.35f), materials.prop);
|
||||
CreateCube("Gate Header", new Vector3(0f, 2.55f, 5.5f), new Vector3(4.8f, 0.25f, 0.35f), materials.prop);
|
||||
CreateCube("Crate A", new Vector3(-4.1f, 0.35f, 1.4f), new Vector3(0.7f, 0.7f, 0.7f), materials.prop);
|
||||
CreateCube("Crate B", new Vector3(-3.45f, 0.25f, 1.95f), new Vector3(0.5f, 0.5f, 0.5f), materials.prop);
|
||||
CreateCylinder("Marker Pillar", new Vector3(3.6f, 0.65f, 0.8f), new Vector3(0.55f, 0.65f, 0.55f), materials.accent);
|
||||
CreateCylinder("Small Barrel", new Vector3(4.2f, 0.5f, 2.1f), new Vector3(0.55f, 0.5f, 0.55f), materials.prop);
|
||||
}
|
||||
|
||||
private static void CreateCube(string name, Vector3 position, Vector3 scale, Material material)
|
||||
{
|
||||
GameObject cube = GameObject.CreatePrimitive(PrimitiveType.Cube);
|
||||
cube.name = name;
|
||||
cube.transform.position = position;
|
||||
cube.transform.localScale = scale;
|
||||
cube.GetComponent<Renderer>().sharedMaterial = material;
|
||||
}
|
||||
|
||||
private static void CreateCylinder(string name, Vector3 position, Vector3 scale, Material material)
|
||||
{
|
||||
GameObject cylinder = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
|
||||
cylinder.name = name;
|
||||
cylinder.transform.position = position;
|
||||
cylinder.transform.localScale = scale;
|
||||
cylinder.GetComponent<Renderer>().sharedMaterial = material;
|
||||
}
|
||||
|
||||
private static SimplePlayerController CreatePlayer(Material playerMaterial)
|
||||
{
|
||||
GameObject player = new GameObject("Player", typeof(CharacterController), typeof(Inventory), typeof(SimplePlayerController));
|
||||
player.transform.position = new Vector3(0f, 0.05f, -5.8f);
|
||||
|
||||
CharacterController characterController = player.GetComponent<CharacterController>();
|
||||
characterController.height = 1.85f;
|
||||
characterController.radius = 0.42f;
|
||||
characterController.center = new Vector3(0f, 0.93f, 0f);
|
||||
|
||||
GameObject body = GameObject.CreatePrimitive(PrimitiveType.Capsule);
|
||||
body.name = "Player Capsule Hidden Visual";
|
||||
body.transform.SetParent(player.transform, false);
|
||||
body.transform.localPosition = new Vector3(0f, 0.93f, 0f);
|
||||
body.transform.localScale = new Vector3(0.82f, 0.9f, 0.82f);
|
||||
body.GetComponent<Renderer>().sharedMaterial = playerMaterial;
|
||||
body.GetComponent<Renderer>().enabled = false;
|
||||
Object.DestroyImmediate(body.GetComponent<Collider>());
|
||||
|
||||
GameObject cameraObject = new GameObject("Player Camera", typeof(Camera), typeof(AudioListener));
|
||||
cameraObject.transform.SetParent(player.transform, false);
|
||||
cameraObject.transform.localPosition = new Vector3(0f, 1.68f, 0.04f);
|
||||
cameraObject.transform.localRotation = Quaternion.identity;
|
||||
Camera camera = cameraObject.GetComponent<Camera>();
|
||||
camera.fieldOfView = 68f;
|
||||
camera.nearClipPlane = 0.03f;
|
||||
|
||||
SimplePlayerController controller = player.GetComponent<SimplePlayerController>();
|
||||
controller.playerCamera = camera;
|
||||
controller.moveSpeed = 4.5f;
|
||||
controller.mouseSensitivity = 2.0f;
|
||||
return controller;
|
||||
}
|
||||
|
||||
private static Canvas CreateCanvas()
|
||||
{
|
||||
GameObject canvasObject = new GameObject("Dialogue Canvas", typeof(Canvas), typeof(CanvasScaler), typeof(GraphicRaycaster));
|
||||
Canvas canvas = canvasObject.GetComponent<Canvas>();
|
||||
canvas.renderMode = RenderMode.ScreenSpaceOverlay;
|
||||
|
||||
CanvasScaler scaler = canvasObject.GetComponent<CanvasScaler>();
|
||||
scaler.uiScaleMode = CanvasScaler.ScaleMode.ScaleWithScreenSize;
|
||||
scaler.referenceResolution = new Vector2(1920f, 1080f);
|
||||
scaler.matchWidthOrHeight = 0f;
|
||||
|
||||
return canvas;
|
||||
}
|
||||
|
||||
private static DialogueManager CreateDialogueUi(Transform canvas, Font font, GameObject responseButtonPrefab, Inventory inventory, SimplePlayerController playerController)
|
||||
{
|
||||
GameObject managerObject = new GameObject("DialogueManager");
|
||||
DialogueManager manager = managerObject.AddComponent<DialogueManager>();
|
||||
manager.playerInventory = inventory;
|
||||
manager.playerController = playerController;
|
||||
manager.responseButtonPrefab = responseButtonPrefab;
|
||||
|
||||
GameObject panel = CreateUiPanel("Dialogue Panel", canvas, new Color(0.035f, 0.047f, 0.058f, 0.97f));
|
||||
RectTransform panelRect = panel.GetComponent<RectTransform>();
|
||||
panelRect.anchorMin = new Vector2(0.5f, 0f);
|
||||
panelRect.anchorMax = new Vector2(0.5f, 0f);
|
||||
panelRect.pivot = new Vector2(0.5f, 0f);
|
||||
panelRect.anchoredPosition = new Vector2(0f, 24f);
|
||||
panelRect.sizeDelta = new Vector2(1560f, 332f);
|
||||
|
||||
panel.AddComponent<RectMask2D>();
|
||||
|
||||
Outline panelOutline = panel.AddComponent<Outline>();
|
||||
panelOutline.effectColor = new Color(0f, 0f, 0f, 0.55f);
|
||||
panelOutline.effectDistance = new Vector2(2f, -2f);
|
||||
|
||||
VerticalLayoutGroup layout = panel.AddComponent<VerticalLayoutGroup>();
|
||||
layout.padding = new RectOffset(28, 28, 18, 18);
|
||||
layout.spacing = 6f;
|
||||
layout.childControlWidth = true;
|
||||
layout.childControlHeight = true;
|
||||
layout.childForceExpandWidth = true;
|
||||
layout.childForceExpandHeight = false;
|
||||
|
||||
Text speaker = CreateText("Speaker Text", panel.transform, font, "Смотритель ворот", 22, FontStyle.Bold, new Color(0.34f, 0.84f, 0.93f), TextAnchor.MiddleLeft);
|
||||
AddLayout(speaker.gameObject, 26f);
|
||||
|
||||
GameObject accentLine = new GameObject("Speaker Accent Line", typeof(RectTransform), typeof(Image));
|
||||
accentLine.transform.SetParent(panel.transform, false);
|
||||
accentLine.GetComponent<Image>().color = new Color(0.22f, 0.72f, 0.86f, 0.9f);
|
||||
AddLayout(accentLine, 2f);
|
||||
|
||||
Text npcLine = CreateText("NPC Line", panel.transform, font, string.Empty, 19, FontStyle.Normal, new Color(0.94f, 0.96f, 0.98f), TextAnchor.UpperLeft);
|
||||
npcLine.horizontalOverflow = HorizontalWrapMode.Wrap;
|
||||
npcLine.verticalOverflow = VerticalWrapMode.Truncate;
|
||||
npcLine.resizeTextForBestFit = true;
|
||||
npcLine.resizeTextMinSize = 14;
|
||||
npcLine.resizeTextMaxSize = 19;
|
||||
AddLayout(npcLine.gameObject, 54f);
|
||||
|
||||
GameObject responseViewport = new GameObject("Response Viewport", typeof(RectTransform), typeof(Image), typeof(RectMask2D), typeof(ScrollRect), typeof(LayoutElement));
|
||||
responseViewport.transform.SetParent(panel.transform, false);
|
||||
Image viewportImage = responseViewport.GetComponent<Image>();
|
||||
viewportImage.color = new Color(0f, 0f, 0f, 0f);
|
||||
LayoutElement viewportLayout = responseViewport.GetComponent<LayoutElement>();
|
||||
viewportLayout.minHeight = 132f;
|
||||
viewportLayout.preferredHeight = 156f;
|
||||
viewportLayout.flexibleHeight = 1f;
|
||||
|
||||
GameObject responseContainer = new GameObject("Response Content", typeof(RectTransform), typeof(VerticalLayoutGroup), typeof(ContentSizeFitter));
|
||||
responseContainer.transform.SetParent(responseViewport.transform, false);
|
||||
RectTransform responseContentRect = responseContainer.GetComponent<RectTransform>();
|
||||
responseContentRect.anchorMin = new Vector2(0f, 1f);
|
||||
responseContentRect.anchorMax = new Vector2(1f, 1f);
|
||||
responseContentRect.pivot = new Vector2(0.5f, 1f);
|
||||
responseContentRect.anchoredPosition = Vector2.zero;
|
||||
responseContentRect.sizeDelta = Vector2.zero;
|
||||
|
||||
VerticalLayoutGroup responseLayout = responseContainer.GetComponent<VerticalLayoutGroup>();
|
||||
responseLayout.padding = new RectOffset(0, 0, 0, 0);
|
||||
responseLayout.spacing = 6f;
|
||||
responseLayout.childControlWidth = true;
|
||||
responseLayout.childControlHeight = true;
|
||||
responseLayout.childForceExpandWidth = true;
|
||||
responseLayout.childForceExpandHeight = false;
|
||||
ContentSizeFitter fitter = responseContainer.GetComponent<ContentSizeFitter>();
|
||||
fitter.verticalFit = ContentSizeFitter.FitMode.PreferredSize;
|
||||
|
||||
ScrollRect scrollRect = responseViewport.GetComponent<ScrollRect>();
|
||||
scrollRect.content = responseContentRect;
|
||||
scrollRect.viewport = responseViewport.GetComponent<RectTransform>();
|
||||
scrollRect.horizontal = false;
|
||||
scrollRect.vertical = true;
|
||||
scrollRect.movementType = ScrollRect.MovementType.Clamped;
|
||||
scrollRect.scrollSensitivity = 24f;
|
||||
|
||||
manager.dialoguePanel = panel;
|
||||
manager.speakerText = speaker;
|
||||
manager.npcText = npcLine;
|
||||
manager.responseContainer = responseContainer.transform;
|
||||
manager.responseScrollRect = scrollRect;
|
||||
panel.SetActive(false);
|
||||
|
||||
return manager;
|
||||
}
|
||||
|
||||
private static DialogueHUD CreateHud(Transform canvas, Font font, Inventory inventory, DialogueManager manager)
|
||||
{
|
||||
GameObject hudObject = new GameObject("DialogueHUD");
|
||||
DialogueHUD hud = hudObject.AddComponent<DialogueHUD>();
|
||||
hud.inventory = inventory;
|
||||
|
||||
Text hint = CreateTextPanel("Hint Text", canvas, font, string.Empty, 20, TextAnchor.MiddleCenter, new Color(0.035f, 0.047f, 0.058f, 0.92f));
|
||||
RectTransform hintRect = hint.transform.parent.GetComponent<RectTransform>();
|
||||
hintRect.anchorMin = new Vector2(0.36f, 0.91f);
|
||||
hintRect.anchorMax = new Vector2(0.64f, 0.975f);
|
||||
hintRect.offsetMin = Vector2.zero;
|
||||
hintRect.offsetMax = Vector2.zero;
|
||||
hint.transform.parent.gameObject.SetActive(false);
|
||||
|
||||
Text inventoryText = CreateTextPanel("Inventory Text", canvas, font, "Инвентарь: пусто", 18, TextAnchor.MiddleLeft, new Color(0.035f, 0.047f, 0.058f, 0.9f));
|
||||
RectTransform inventoryRect = inventoryText.transform.parent.GetComponent<RectTransform>();
|
||||
inventoryRect.anchorMin = new Vector2(0.68f, 0.91f);
|
||||
inventoryRect.anchorMax = new Vector2(0.98f, 0.975f);
|
||||
inventoryRect.offsetMin = Vector2.zero;
|
||||
inventoryRect.offsetMax = Vector2.zero;
|
||||
|
||||
Text status = CreateTextPanel("Status Text", canvas, font, string.Empty, 18, TextAnchor.MiddleCenter, new Color(0.035f, 0.047f, 0.058f, 0.92f));
|
||||
RectTransform statusRect = status.transform.parent.GetComponent<RectTransform>();
|
||||
statusRect.anchorMin = new Vector2(0.34f, 0.455f);
|
||||
statusRect.anchorMax = new Vector2(0.66f, 0.515f);
|
||||
statusRect.offsetMin = Vector2.zero;
|
||||
statusRect.offsetMax = Vector2.zero;
|
||||
status.transform.parent.gameObject.SetActive(false);
|
||||
|
||||
hud.hintText = hint;
|
||||
hud.inventoryText = inventoryText;
|
||||
hud.statusText = status;
|
||||
|
||||
manager.hintText = hint;
|
||||
manager.statusText = status;
|
||||
|
||||
return hud;
|
||||
}
|
||||
|
||||
private static Text CreateTextPanel(string name, Transform parent, Font font, string value, int size, TextAnchor anchor, Color background)
|
||||
{
|
||||
GameObject panel = CreateUiPanel(name, parent, background);
|
||||
GameObject textObject = new GameObject("Text", typeof(RectTransform), typeof(Text), typeof(Outline));
|
||||
textObject.transform.SetParent(panel.transform, false);
|
||||
|
||||
RectTransform textRect = textObject.GetComponent<RectTransform>();
|
||||
textRect.anchorMin = Vector2.zero;
|
||||
textRect.anchorMax = Vector2.one;
|
||||
textRect.offsetMin = new Vector2(18f, 8f);
|
||||
textRect.offsetMax = new Vector2(-18f, -8f);
|
||||
|
||||
Text text = textObject.GetComponent<Text>();
|
||||
text.font = font;
|
||||
text.text = value;
|
||||
text.fontSize = size;
|
||||
text.color = Color.white;
|
||||
text.alignment = anchor;
|
||||
text.horizontalOverflow = HorizontalWrapMode.Wrap;
|
||||
text.verticalOverflow = VerticalWrapMode.Truncate;
|
||||
text.raycastTarget = false;
|
||||
|
||||
Outline outline = textObject.GetComponent<Outline>();
|
||||
outline.effectColor = new Color(0f, 0f, 0f, 0.35f);
|
||||
outline.effectDistance = new Vector2(1f, -1f);
|
||||
return text;
|
||||
}
|
||||
|
||||
private static GameObject CreateUiPanel(string name, Transform parent, Color color)
|
||||
{
|
||||
GameObject panel = new GameObject(name, typeof(RectTransform), typeof(Image));
|
||||
panel.transform.SetParent(parent, false);
|
||||
Image image = panel.GetComponent<Image>();
|
||||
image.color = color;
|
||||
return panel;
|
||||
}
|
||||
|
||||
private static Text CreateText(string name, Transform parent, Font font, string value, int size, FontStyle style, Color color, TextAnchor anchor)
|
||||
{
|
||||
GameObject textObject = new GameObject(name, typeof(RectTransform), typeof(Text));
|
||||
textObject.transform.SetParent(parent, false);
|
||||
|
||||
Text text = textObject.GetComponent<Text>();
|
||||
text.font = font;
|
||||
text.text = value;
|
||||
text.fontSize = size;
|
||||
text.fontStyle = style;
|
||||
text.color = color;
|
||||
text.alignment = anchor;
|
||||
text.raycastTarget = false;
|
||||
return text;
|
||||
}
|
||||
|
||||
private static void AddLayout(GameObject target, float preferredHeight)
|
||||
{
|
||||
LayoutElement element = target.GetComponent<LayoutElement>();
|
||||
if (element == null)
|
||||
element = target.AddComponent<LayoutElement>();
|
||||
|
||||
element.minHeight = preferredHeight;
|
||||
element.preferredHeight = preferredHeight;
|
||||
}
|
||||
|
||||
private static void CreateNpc(DialogueNode startNode, DialogueManager manager, MaterialLibrary materials, Font font)
|
||||
{
|
||||
GameObject npc = GameObject.CreatePrimitive(PrimitiveType.Capsule);
|
||||
npc.name = "NPC_Gatekeeper";
|
||||
npc.transform.position = new Vector3(0f, 1f, 2.7f);
|
||||
npc.GetComponent<Renderer>().sharedMaterial = materials.npc;
|
||||
|
||||
Rigidbody rigidbody = npc.AddComponent<Rigidbody>();
|
||||
rigidbody.isKinematic = true;
|
||||
rigidbody.useGravity = false;
|
||||
|
||||
NPCInteract interact = npc.AddComponent<NPCInteract>();
|
||||
interact.startNode = startNode;
|
||||
interact.npcDisplayName = "Смотритель ворот";
|
||||
interact.interactionRadius = 3f;
|
||||
interact.dialogueManager = manager;
|
||||
interact.highlightRenderer = npc.GetComponent<Renderer>();
|
||||
|
||||
GameObject zone = GameObject.CreatePrimitive(PrimitiveType.Cylinder);
|
||||
zone.name = "NPC Interaction Zone Visual";
|
||||
zone.transform.position = new Vector3(0f, 0.02f, 2.7f);
|
||||
zone.transform.localScale = new Vector3(3f, 0.02f, 3f);
|
||||
zone.GetComponent<Renderer>().sharedMaterial = materials.interactionZone;
|
||||
Object.DestroyImmediate(zone.GetComponent<Collider>());
|
||||
|
||||
GameObject nameplate = new GameObject("NPC Nameplate", typeof(TextMesh), typeof(BillboardNameplate));
|
||||
nameplate.transform.SetParent(npc.transform, false);
|
||||
nameplate.transform.localPosition = new Vector3(0f, 1.55f, 0f);
|
||||
TextMesh textMesh = nameplate.GetComponent<TextMesh>();
|
||||
textMesh.text = "Смотритель ворот";
|
||||
textMesh.font = font;
|
||||
textMesh.fontSize = 48;
|
||||
textMesh.characterSize = 0.045f;
|
||||
textMesh.anchor = TextAnchor.MiddleCenter;
|
||||
textMesh.alignment = TextAlignment.Center;
|
||||
textMesh.color = Color.white;
|
||||
MeshRenderer renderer = nameplate.GetComponent<MeshRenderer>();
|
||||
if (font != null)
|
||||
renderer.sharedMaterial = font.material;
|
||||
}
|
||||
|
||||
private static void CreatePickup(ItemData villagePass, Inventory inventory, Material material)
|
||||
{
|
||||
GameObject pickup = GameObject.CreatePrimitive(PrimitiveType.Cube);
|
||||
pickup.name = "Pickup_VillagePass";
|
||||
pickup.transform.position = new Vector3(-2.9f, 0.35f, -0.2f);
|
||||
pickup.transform.rotation = Quaternion.Euler(0f, 25f, 0f);
|
||||
pickup.transform.localScale = new Vector3(0.55f, 0.12f, 0.78f);
|
||||
pickup.GetComponent<Renderer>().sharedMaterial = material;
|
||||
|
||||
Rigidbody rigidbody = pickup.AddComponent<Rigidbody>();
|
||||
rigidbody.isKinematic = true;
|
||||
rigidbody.useGravity = false;
|
||||
|
||||
PickupItem pickupItem = pickup.AddComponent<PickupItem>();
|
||||
pickupItem.item = villagePass;
|
||||
pickupItem.amount = 1;
|
||||
pickupItem.targetInventory = inventory;
|
||||
pickupItem.interactionRadius = 2.25f;
|
||||
}
|
||||
|
||||
private static void CreateEventSystem()
|
||||
{
|
||||
if (Object.FindObjectOfType<EventSystem>() != null)
|
||||
return;
|
||||
|
||||
GameObject eventSystem = new GameObject("EventSystem", typeof(EventSystem), typeof(StandaloneInputModule));
|
||||
eventSystem.transform.position = Vector3.zero;
|
||||
}
|
||||
|
||||
private static void ApplyFontToAllText(Transform root, Font font)
|
||||
{
|
||||
if (font == null)
|
||||
return;
|
||||
|
||||
foreach (Text text in root.GetComponentsInChildren<Text>(true))
|
||||
{
|
||||
text.font = font;
|
||||
EditorUtility.SetDirty(text);
|
||||
}
|
||||
}
|
||||
|
||||
private class MaterialLibrary
|
||||
{
|
||||
public Material ground;
|
||||
public Material player;
|
||||
public Material npc;
|
||||
public Material pass;
|
||||
public Material prop;
|
||||
public Material accent;
|
||||
public Material interactionZone;
|
||||
}
|
||||
|
||||
private class ItemLibrary
|
||||
{
|
||||
public ItemData villagePass;
|
||||
public ItemData oldAmulet;
|
||||
}
|
||||
|
||||
private class DialogueLibrary
|
||||
{
|
||||
public DialogueNode start;
|
||||
public DialogueNode newcomer;
|
||||
public DialogueNode passInfo;
|
||||
public DialogueNode noPassWarning;
|
||||
public DialogueNode hasPass;
|
||||
public DialogueNode work;
|
||||
public DialogueNode reward;
|
||||
public DialogueNode amuletComplete;
|
||||
public DialogueNode goodbye;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d94e4ff3e7a9f9fbfa8185d23dfeba4f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e9281ef6e715b6f398000392aba867d8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,267 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 0
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_HaloStrength: 0.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: 705507994}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 12
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 1
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 12
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_ExtractAmbientOcclusion: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 1
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVREnvironmentSampleCount: 500
|
||||
m_PVREnvironmentReferencePointCount: 2048
|
||||
m_PVRFilteringMode: 2
|
||||
m_PVRDenoiserTypeDirect: 0
|
||||
m_PVRDenoiserTypeIndirect: 0
|
||||
m_PVRDenoiserTypeAO: 0
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVREnvironmentMIS: 0
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ExportTrainingData: 0
|
||||
m_TrainingDataDestination: TrainingData
|
||||
m_LightProbeSampleCountMultiplier: 4
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_LightingSettings: {fileID: 0}
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &705507993
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 705507995}
|
||||
- component: {fileID: 705507994}
|
||||
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 &705507994
|
||||
Light:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 8
|
||||
m_Type: 1
|
||||
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
|
||||
m_Intensity: 1
|
||||
m_Range: 10
|
||||
m_SpotAngle: 30
|
||||
m_CookieSize: 10
|
||||
m_Shadows:
|
||||
m_Type: 2
|
||||
m_Resolution: -1
|
||||
m_CustomResolution: -1
|
||||
m_Strength: 1
|
||||
m_Bias: 0.05
|
||||
m_NormalBias: 0.4
|
||||
m_NearPlane: 0.2
|
||||
m_Cookie: {fileID: 0}
|
||||
m_DrawHalo: 0
|
||||
m_Flare: {fileID: 0}
|
||||
m_RenderMode: 0
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_Lightmapping: 1
|
||||
m_LightShadowCasterMode: 0
|
||||
m_AreaSize: {x: 1, y: 1}
|
||||
m_BounceIntensity: 1
|
||||
m_ColorTemperature: 6570
|
||||
m_UseColorTemperature: 0
|
||||
m_ShadowRadius: 0
|
||||
m_ShadowAngle: 0
|
||||
--- !u!4 &705507995
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 705507993}
|
||||
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
|
||||
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
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1 &963194225
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 963194228}
|
||||
- component: {fileID: 963194227}
|
||||
- component: {fileID: 963194226}
|
||||
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 &963194226
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &963194227
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_GateFitMode: 2
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
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_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &963194228
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 963194225}
|
||||
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
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9fc0d4010bbf28b4594072e72b8655ab
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 541d879da1f1c75978d449e9d4840ecf
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6c5d03e9db0cf694b29e3aae1502645
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,9 @@
|
||||
StartNode
|
||||
├─ Да, я только пришёл → Node_Newcomer
|
||||
│ ├─ Где его получить? → Node_PassInfo → Node_Goodbye
|
||||
│ ├─ У меня уже есть пропуск [requires VillagePass] → Node_HasPass → Node_Reward [gives OldAmulet] → Node_Goodbye
|
||||
│ └─ Понятно → Node_Goodbye
|
||||
├─ Я ищу работу → Node_Work
|
||||
│ ├─ У меня есть амулет [requires OldAmulet, consumes] → Node_AmuletQuestComplete → Node_Goodbye
|
||||
│ └─ Я вернусь позже → Node_Goodbye
|
||||
└─ Мне пора → Node_Goodbye
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bc5d50dd17fa1dbad872025f2468e21b
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,36 @@
|
||||
%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: 760b0a0b8bcf617edbf21f60d51169f5, type: 3}
|
||||
m_Name: Node_AmuletQuestComplete
|
||||
m_EditorClassIdentifier:
|
||||
nodeId: Node_AmuletQuestComplete
|
||||
speakerName: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435\u043B\u044C \u0432\u043E\u0440\u043E\u0442"
|
||||
npcLine: "\u0422\u044B \u0441\u043F\u0440\u0430\u0432\u0438\u043B\u0441\u044F.
|
||||
\u0422\u0435\u043F\u0435\u0440\u044C \u044F \u0434\u043E\u0432\u0435\u0440\u044F\u044E
|
||||
\u0442\u0435\u0431\u0435. \u0414\u043B\u044F \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E
|
||||
\u0437\u0430\u0434\u0430\u043D\u0438\u044F \u043F\u0440\u0438\u0445\u043E\u0434\u0438
|
||||
\u043F\u043E\u0437\u0436\u0435."
|
||||
responses:
|
||||
- responseText: "\u041F\u043E\u043D\u044F\u043B."
|
||||
nextNode: {fileID: 11400000, guid: 383892541d8e0319bbc75a6186eaaa22, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
isEndNode: 0
|
||||
editorNote: Generated by Lab4SceneBuilder.
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29ce80f5d673e23d1b5e62e290dc8231
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
%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: 760b0a0b8bcf617edbf21f60d51169f5, type: 3}
|
||||
m_Name: Node_Goodbye
|
||||
m_EditorClassIdentifier:
|
||||
nodeId: Node_Goodbye
|
||||
speakerName: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435\u043B\u044C \u0432\u043E\u0440\u043E\u0442"
|
||||
npcLine: "\u0423\u0434\u0430\u0447\u0438 \u0442\u0435\u0431\u0435."
|
||||
responses: []
|
||||
isEndNode: 1
|
||||
editorNote: Generated by Lab4SceneBuilder.
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 383892541d8e0319bbc75a6186eaaa22
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
%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: 760b0a0b8bcf617edbf21f60d51169f5, type: 3}
|
||||
m_Name: Node_HasPass
|
||||
m_EditorClassIdentifier:
|
||||
nodeId: Node_HasPass
|
||||
speakerName: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435\u043B\u044C \u0432\u043E\u0440\u043E\u0442"
|
||||
npcLine: "\u041E\u0442\u043B\u0438\u0447\u043D\u043E. \u0420\u0430\u0437 \u0443
|
||||
\u0442\u0435\u0431\u044F \u0435\u0441\u0442\u044C \u043F\u0440\u043E\u043F\u0443\u0441\u043A,
|
||||
\u043C\u043E\u0436\u0435\u0448\u044C \u043F\u0440\u043E\u0439\u0442\u0438 \u0434\u0430\u043B\u044C\u0448\u0435.
|
||||
\u041F\u0435\u0440\u0435\u0434\u0430\u0439 \u0441\u0442\u0430\u0440\u043E\u0441\u0442\u0435,
|
||||
\u0447\u0442\u043E \u044F \u0442\u0435\u0431\u044F \u043D\u0430\u043F\u0440\u0430\u0432\u0438\u043B."
|
||||
responses:
|
||||
- responseText: "\u0421\u043F\u0430\u0441\u0438\u0431\u043E \u0437\u0430 \u043F\u043E\u043C\u043E\u0449\u044C."
|
||||
nextNode: {fileID: 11400000, guid: ab3a9e942b05a9263a6d51dce7202831, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 11400000, guid: 4dfdce9673ed5545f810743017daa36d, type: 2}
|
||||
rewardAmount: 1
|
||||
eventId: Gatekeeper_Rewards_Amulet
|
||||
editorNote:
|
||||
- responseText: "\u0414\u043E \u0432\u0441\u0442\u0440\u0435\u0447\u0438."
|
||||
nextNode: {fileID: 11400000, guid: 383892541d8e0319bbc75a6186eaaa22, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
isEndNode: 0
|
||||
editorNote: Generated by Lab4SceneBuilder.
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 375d98e835fb83edbb7d8d59d41da74a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,61 @@
|
||||
%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: 760b0a0b8bcf617edbf21f60d51169f5, type: 3}
|
||||
m_Name: Node_Newcomer
|
||||
m_EditorClassIdentifier:
|
||||
nodeId: Node_Newcomer
|
||||
speakerName: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435\u043B\u044C \u0432\u043E\u0440\u043E\u0442"
|
||||
npcLine: "\u0422\u043E\u0433\u0434\u0430 \u0442\u0435\u0431\u0435 \u043F\u043E\u043D\u0430\u0434\u043E\u0431\u0438\u0442\u0441\u044F
|
||||
\u043F\u0440\u043E\u043F\u0443\u0441\u043A. \u0411\u0435\u0437 \u043D\u0435\u0433\u043E
|
||||
\u0441\u0442\u0440\u0430\u0436\u0430 \u043D\u0435 \u043F\u0443\u0441\u0442\u0438\u0442
|
||||
\u0442\u0435\u0431\u044F \u043A \u0441\u0442\u0430\u0440\u043E\u0441\u0442\u0435."
|
||||
responses:
|
||||
- responseText: "\u0413\u0434\u0435 \u0435\u0433\u043E \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u044C?"
|
||||
nextNode: {fileID: 11400000, guid: ea2902f885ec789d2ba98bcf4e4d7c3a, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
- responseText: "\u0423 \u043C\u0435\u043D\u044F \u0443\u0436\u0435 \u0435\u0441\u0442\u044C
|
||||
\u043F\u0440\u043E\u043F\u0443\u0441\u043A."
|
||||
nextNode: {fileID: 11400000, guid: 375d98e835fb83edbb7d8d59d41da74a, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 11400000, guid: 1948f34725c9eafe184a7fe1401abc31, type: 2}
|
||||
requiredItemAmount: 1
|
||||
unavailableText: "\u041D\u0443\u0436\u0435\u043D \u043F\u0440\u0435\u0434\u043C\u0435\u0442:
|
||||
\u041F\u0440\u043E\u043F\u0443\u0441\u043A"
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
- responseText: "\u041F\u043E\u043D\u044F\u0442\u043D\u043E."
|
||||
nextNode: {fileID: 11400000, guid: 383892541d8e0319bbc75a6186eaaa22, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
isEndNode: 0
|
||||
editorNote: Generated by Lab4SceneBuilder.
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 17cf111c1e9f11dae967fc52b0fa9a00
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
%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: 760b0a0b8bcf617edbf21f60d51169f5, type: 3}
|
||||
m_Name: Node_NoPassWarning
|
||||
m_EditorClassIdentifier:
|
||||
nodeId: Node_NoPassWarning
|
||||
speakerName: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435\u043B\u044C \u0432\u043E\u0440\u043E\u0442"
|
||||
npcLine: "\u0411\u0435\u0437 \u043F\u0440\u043E\u043F\u0443\u0441\u043A\u0430 \u0442\u0435\u0431\u044F
|
||||
\u043D\u0435 \u043F\u0440\u0438\u043C\u0443\u0442. \u0421\u043D\u0430\u0447\u0430\u043B\u0430
|
||||
\u043D\u0430\u0439\u0434\u0438 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442."
|
||||
responses:
|
||||
- responseText: "\u0425\u043E\u0440\u043E\u0448\u043E, \u043D\u0430\u0439\u0434\u0443
|
||||
\u043F\u0440\u043E\u043F\u0443\u0441\u043A."
|
||||
nextNode: {fileID: 11400000, guid: 383892541d8e0319bbc75a6186eaaa22, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
isEndNode: 0
|
||||
editorNote: Generated by Lab4SceneBuilder.
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4bb096ff07b2b34c2a5d22f125e29365
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,48 @@
|
||||
%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: 760b0a0b8bcf617edbf21f60d51169f5, type: 3}
|
||||
m_Name: Node_PassInfo
|
||||
m_EditorClassIdentifier:
|
||||
nodeId: Node_PassInfo
|
||||
speakerName: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435\u043B\u044C \u0432\u043E\u0440\u043E\u0442"
|
||||
npcLine: "\u041E\u0441\u043C\u043E\u0442\u0440\u0438 \u043F\u043B\u043E\u0449\u0430\u0434\u043A\u0443
|
||||
\u0440\u044F\u0434\u043E\u043C \u0441 \u0432\u043E\u0440\u043E\u0442\u0430\u043C\u0438.
|
||||
\u0418\u043D\u043E\u0433\u0434\u0430 \u0442\u0430\u043C \u043E\u0441\u0442\u0430\u0432\u043B\u044F\u044E\u0442
|
||||
\u0432\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0435 \u043F\u0440\u043E\u043F\u0443\u0441\u043A\u0430."
|
||||
responses:
|
||||
- responseText: "\u0421\u043F\u0430\u0441\u0438\u0431\u043E, \u044F \u043F\u043E\u0438\u0449\u0443."
|
||||
nextNode: {fileID: 11400000, guid: 383892541d8e0319bbc75a6186eaaa22, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
- responseText: "\u042F \u043B\u0443\u0447\u0448\u0435 \u0441\u0440\u0430\u0437\u0443
|
||||
\u043F\u043E\u0439\u0434\u0443 \u043A \u0441\u0442\u0430\u0440\u043E\u0441\u0442\u0435."
|
||||
nextNode: {fileID: 11400000, guid: 4bb096ff07b2b34c2a5d22f125e29365, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
isEndNode: 0
|
||||
editorNote: Generated by Lab4SceneBuilder.
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea2902f885ec789d2ba98bcf4e4d7c3a
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
%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: 760b0a0b8bcf617edbf21f60d51169f5, type: 3}
|
||||
m_Name: Node_Reward
|
||||
m_EditorClassIdentifier:
|
||||
nodeId: Node_Reward
|
||||
speakerName: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435\u043B\u044C \u0432\u043E\u0440\u043E\u0442"
|
||||
npcLine: "\u0412\u043E\u0437\u044C\u043C\u0438 \u044D\u0442\u043E\u0442 \u0441\u0442\u0430\u0440\u044B\u0439
|
||||
\u0430\u043C\u0443\u043B\u0435\u0442. \u041E\u043D \u043C\u043E\u0436\u0435\u0442
|
||||
\u043F\u0440\u0438\u0433\u043E\u0434\u0438\u0442\u044C\u0441\u044F \u0432 \u0440\u0430\u0437\u0433\u043E\u0432\u043E\u0440\u0435
|
||||
\u043E \u0440\u0430\u0431\u043E\u0442\u0435."
|
||||
responses:
|
||||
- responseText: "\u0411\u043B\u0430\u0433\u043E\u0434\u0430\u0440\u044E."
|
||||
nextNode: {fileID: 11400000, guid: 383892541d8e0319bbc75a6186eaaa22, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
isEndNode: 0
|
||||
editorNote: Generated by Lab4SceneBuilder.
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ab3a9e942b05a9263a6d51dce7202831
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,47 @@
|
||||
%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: 760b0a0b8bcf617edbf21f60d51169f5, type: 3}
|
||||
m_Name: Node_Work
|
||||
m_EditorClassIdentifier:
|
||||
nodeId: Node_Work
|
||||
speakerName: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435\u043B\u044C \u0432\u043E\u0440\u043E\u0442"
|
||||
npcLine: "\u0420\u0430\u0431\u043E\u0442\u0430 \u0435\u0441\u0442\u044C. \u041F\u0440\u0438\u043D\u0435\u0441\u0438
|
||||
\u0441\u0442\u0430\u0440\u044B\u0439 \u0430\u043C\u0443\u043B\u0435\u0442, \u0438
|
||||
\u044F \u0440\u0430\u0441\u0441\u043A\u0430\u0436\u0443 \u0431\u043E\u043B\u044C\u0448\u0435."
|
||||
responses:
|
||||
- responseText: "\u0423 \u043C\u0435\u043D\u044F \u0435\u0441\u0442\u044C \u0430\u043C\u0443\u043B\u0435\u0442."
|
||||
nextNode: {fileID: 11400000, guid: 29ce80f5d673e23d1b5e62e290dc8231, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 11400000, guid: 4dfdce9673ed5545f810743017daa36d, type: 2}
|
||||
requiredItemAmount: 1
|
||||
unavailableText: "\u041D\u0443\u0436\u0435\u043D \u043F\u0440\u0435\u0434\u043C\u0435\u0442:
|
||||
\u0421\u0442\u0430\u0440\u044B\u0439 \u0430\u043C\u0443\u043B\u0435\u0442"
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 1
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId: Gatekeeper_Amulet_TurnedIn
|
||||
editorNote:
|
||||
- responseText: "\u042F \u0432\u0435\u0440\u043D\u0443\u0441\u044C \u043F\u043E\u0437\u0436\u0435."
|
||||
nextNode: {fileID: 11400000, guid: 383892541d8e0319bbc75a6186eaaa22, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
isEndNode: 0
|
||||
editorNote: Generated by Lab4SceneBuilder.
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 854e8aae1ea0f98038f36b5e8caef9a7
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,58 @@
|
||||
%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: 760b0a0b8bcf617edbf21f60d51169f5, type: 3}
|
||||
m_Name: StartNode
|
||||
m_EditorClassIdentifier:
|
||||
nodeId: StartNode
|
||||
speakerName: "\u0421\u043C\u043E\u0442\u0440\u0438\u0442\u0435\u043B\u044C \u0432\u043E\u0440\u043E\u0442"
|
||||
npcLine: "\u041F\u0440\u0438\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E, \u043F\u0443\u0442\u043D\u0438\u043A.
|
||||
\u0422\u044B \u0432\u043F\u0435\u0440\u0432\u044B\u0435 \u0432 \u043D\u0430\u0448\u0435\u043C
|
||||
\u043F\u043E\u0441\u0435\u043B\u0435\u043D\u0438\u0438?"
|
||||
responses:
|
||||
- responseText: "\u0414\u0430, \u044F \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u0438\u0448\u0451\u043B."
|
||||
nextNode: {fileID: 11400000, guid: 17cf111c1e9f11dae967fc52b0fa9a00, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
- responseText: "\u042F \u0438\u0449\u0443 \u0440\u0430\u0431\u043E\u0442\u0443."
|
||||
nextNode: {fileID: 11400000, guid: 854e8aae1ea0f98038f36b5e8caef9a7, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
- responseText: "\u041C\u043D\u0435 \u043F\u043E\u0440\u0430."
|
||||
nextNode: {fileID: 11400000, guid: 383892541d8e0319bbc75a6186eaaa22, type: 2}
|
||||
endsDialogue: 0
|
||||
requiredItem: {fileID: 0}
|
||||
requiredItemAmount: 1
|
||||
unavailableText:
|
||||
hideIfRequirementsNotMet: 0
|
||||
consumeRequiredItem: 0
|
||||
rewardItem: {fileID: 0}
|
||||
rewardAmount: 0
|
||||
eventId:
|
||||
editorNote:
|
||||
isEndNode: 0
|
||||
editorNote: Generated by Lab4SceneBuilder.
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2c517f55d67bb9d52bcfb9d2205973f3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 126b67249333af464a866109230ffc55
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,21 @@
|
||||
%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: 10cf6353066082490a62140ae9883b4e, type: 3}
|
||||
m_Name: OldAmulet
|
||||
m_EditorClassIdentifier:
|
||||
itemId: OldAmulet
|
||||
itemName: "\u0421\u0442\u0430\u0440\u044B\u0439 \u0430\u043C\u0443\u043B\u0435\u0442"
|
||||
description: "\u041F\u043E\u0442\u0451\u0440\u0442\u044B\u0439 \u0430\u043C\u0443\u043B\u0435\u0442,
|
||||
\u043A\u043E\u0442\u043E\u0440\u044B\u0439 \u0446\u0435\u043D\u0438\u0442 \u0441\u043C\u043E\u0442\u0440\u0438\u0442\u0435\u043B\u044C
|
||||
\u0432\u043E\u0440\u043E\u0442."
|
||||
itemColor: {r: 0.35, g: 0.82, b: 0.8, a: 1}
|
||||
maxStack: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4dfdce9673ed5545f810743017daa36d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,20 @@
|
||||
%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: 10cf6353066082490a62140ae9883b4e, type: 3}
|
||||
m_Name: VillagePass
|
||||
m_EditorClassIdentifier:
|
||||
itemId: VillagePass
|
||||
itemName: "\u041F\u0440\u043E\u043F\u0443\u0441\u043A"
|
||||
description: "\u0412\u0440\u0435\u043C\u0435\u043D\u043D\u044B\u0439 \u0434\u043E\u043A\u0443\u043C\u0435\u043D\u0442
|
||||
\u0434\u043B\u044F \u043F\u0440\u043E\u0445\u043E\u0434\u0430 \u043A \u0441\u0442\u0430\u0440\u043E\u0441\u0442\u0435."
|
||||
itemColor: {r: 0.95, g: 0.78, b: 0.25, a: 1}
|
||||
maxStack: 1
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1948f34725c9eafe184a7fe1401abc31
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4138ff2a98f092710841b54391c3f3e1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ebf6804731ec8f129b0d93fc8e35a41
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Ubuntu
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 246db836d56067b1abb58a00d7454cd3
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Ubuntu
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14ca0c00ae60f2baebde819ec5b2066f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Accent_Mat
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.14, g: 0.62, b: 0.75, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b2eeb90b6cbafc714a81403e3494c019
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Ground_Mat
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.34, g: 0.43, b: 0.34, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 888fb834bdc23d87687d873f7461669e
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,85 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: InteractionZone_Mat
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ALPHABLEND_ON
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: 3000
|
||||
stringTagMap:
|
||||
RenderType: Transparent
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 10
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 3
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 5
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 0
|
||||
m_Colors:
|
||||
- _Color: {r: 0.25, g: 0.75, b: 1, a: 0.22}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 04dc3ed25e03311779bffd7cc2f73153
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: NPC_Mat
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.68, g: 0.44, b: 0.17, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3b67f7424508220a7ac9d023503378b9
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Player_Mat
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.17, g: 0.43, b: 0.74, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: baae7e08d996934a8b123404fe1d2f9c
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Props_Mat
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.42, g: 0.34, b: 0.25, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5c5fd0b10aae268219daa90d284713f8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,83 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: VillagePass_Mat
|
||||
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap: {}
|
||||
disabledShaderPasses: []
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _BumpScale: 1
|
||||
- _Cutoff: 0.5
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _UVSec: 0
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _Color: {r: 0.95, g: 0.78, b: 0.25, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac8cd1038c707ef6994a57b919293af8
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57337c3f1b36c00239f075e0e4ffa99f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,239 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3368912128373501329
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6949163752797181151}
|
||||
- component: {fileID: 4839956813578837829}
|
||||
- component: {fileID: 5338732998552244497}
|
||||
- component: {fileID: 5564887236668309152}
|
||||
- component: {fileID: 5852493321096903877}
|
||||
- component: {fileID: 624210078001198012}
|
||||
m_Layer: 0
|
||||
m_Name: DialogueResponseButton
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &6949163752797181151
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3368912128373501329}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 952857989457316796}
|
||||
m_Father: {fileID: 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, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 38}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &4839956813578837829
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3368912128373501329}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &5338732998552244497
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3368912128373501329}
|
||||
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: 0.095, g: 0.12, b: 0.15, a: 0.98}
|
||||
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: 0}
|
||||
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 &5564887236668309152
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3368912128373501329}
|
||||
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: 0.095, g: 0.12, b: 0.15, a: 0.98}
|
||||
m_HighlightedColor: {r: 0.16, g: 0.26, b: 0.31, a: 1}
|
||||
m_PressedColor: {r: 0.08, g: 0.42, b: 0.52, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.12, g: 0.13, b: 0.15, a: 0.88}
|
||||
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: 5338732998552244497}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!114 &5852493321096903877
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3368912128373501329}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreLayout: 0
|
||||
m_MinWidth: -1
|
||||
m_MinHeight: 36
|
||||
m_PreferredWidth: -1
|
||||
m_PreferredHeight: 38
|
||||
m_FlexibleWidth: -1
|
||||
m_FlexibleHeight: -1
|
||||
m_LayoutPriority: 1
|
||||
--- !u!114 &624210078001198012
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3368912128373501329}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: e19747de3f5aca642ab2be37e372fb86, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_EffectColor: {r: 0.36, g: 0.48, b: 0.54, a: 0.28}
|
||||
m_EffectDistance: {x: 1, y: -1}
|
||||
m_UseGraphicAlpha: 1
|
||||
--- !u!1 &8137120111779427874
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 952857989457316796}
|
||||
- component: {fileID: 7519030131052880030}
|
||||
- component: {fileID: 6087224731597957500}
|
||||
m_Layer: 0
|
||||
m_Name: Text
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &952857989457316796
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8137120111779427874}
|
||||
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_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 6949163752797181151}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: -36, y: -8}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &7519030131052880030
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8137120111779427874}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &6087224731597957500
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8137120111779427874}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 0
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 246db836d56067b1abb58a00d7454cd3, type: 3}
|
||||
m_FontSize: 17
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 1
|
||||
m_MinSize: 12
|
||||
m_MaxSize: 17
|
||||
m_Alignment: 3
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u041E\u0442\u0432\u0435\u0442"
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7def479fd5843b6987401ed9b84fe01
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3972c0338abde5077ad67c6ce3a9988e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 85f8c321878c396a2a300a14c447d1d9
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3080beabd670eec328bfdb1c1e1d1456
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class BillboardNameplate : MonoBehaviour
|
||||
{
|
||||
public Camera targetCamera;
|
||||
|
||||
private void LateUpdate()
|
||||
{
|
||||
Camera cam = targetCamera != null ? targetCamera : Camera.main;
|
||||
if (cam == null)
|
||||
return;
|
||||
|
||||
transform.rotation = Quaternion.LookRotation(transform.position - cam.transform.position);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a56680789bcc19bc2af5ed5e1245b7e8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,111 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class DialogueHUD : MonoBehaviour
|
||||
{
|
||||
public static DialogueHUD Instance { get; private set; }
|
||||
|
||||
[Header("UI")]
|
||||
public Text hintText;
|
||||
public Text statusText;
|
||||
public Text inventoryText;
|
||||
|
||||
[Header("Data")]
|
||||
public Inventory inventory;
|
||||
public float messageDuration = 2.5f;
|
||||
|
||||
private Coroutine messageRoutine;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance != null && Instance != this)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (inventory != null)
|
||||
inventory.OnInventoryChanged += UpdateInventoryText;
|
||||
|
||||
HideHint();
|
||||
UpdateInventoryText();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
if (inventory != null)
|
||||
inventory.OnInventoryChanged -= UpdateInventoryText;
|
||||
}
|
||||
|
||||
public void ShowHint(string message)
|
||||
{
|
||||
if (hintText == null)
|
||||
return;
|
||||
|
||||
hintText.text = message;
|
||||
SetTextRootActive(hintText, !string.IsNullOrEmpty(message));
|
||||
}
|
||||
|
||||
public void HideHint()
|
||||
{
|
||||
if (hintText == null)
|
||||
return;
|
||||
|
||||
hintText.text = string.Empty;
|
||||
SetTextRootActive(hintText, false);
|
||||
}
|
||||
|
||||
public void SetStatus(string message)
|
||||
{
|
||||
if (statusText == null)
|
||||
return;
|
||||
|
||||
statusText.text = message;
|
||||
SetTextRootActive(statusText, !string.IsNullOrEmpty(message));
|
||||
|
||||
if (messageRoutine != null)
|
||||
StopCoroutine(messageRoutine);
|
||||
|
||||
if (!string.IsNullOrEmpty(message) && gameObject.activeInHierarchy)
|
||||
messageRoutine = StartCoroutine(ClearStatusAfterDelay());
|
||||
}
|
||||
|
||||
public void UpdateInventoryText()
|
||||
{
|
||||
if (inventoryText == null)
|
||||
return;
|
||||
|
||||
inventoryText.text = inventory != null ? inventory.GetDebugText() : "Инвентарь: недоступен";
|
||||
}
|
||||
|
||||
private IEnumerator ClearStatusAfterDelay()
|
||||
{
|
||||
yield return new WaitForSeconds(messageDuration);
|
||||
|
||||
if (statusText != null)
|
||||
{
|
||||
statusText.text = string.Empty;
|
||||
SetTextRootActive(statusText, false);
|
||||
}
|
||||
|
||||
messageRoutine = null;
|
||||
}
|
||||
|
||||
private static void SetTextRootActive(Text text, bool active)
|
||||
{
|
||||
if (text == null)
|
||||
return;
|
||||
|
||||
Transform parent = text.transform.parent;
|
||||
if (parent != null && parent.GetComponent<Image>() != null)
|
||||
parent.gameObject.SetActive(active);
|
||||
else
|
||||
text.gameObject.SetActive(active);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 209c58a4fe0343f04ad50081998de8c4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,404 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class DialogueManager : MonoBehaviour
|
||||
{
|
||||
public static DialogueManager Instance { get; private set; }
|
||||
|
||||
[Header("UI")]
|
||||
public GameObject dialoguePanel;
|
||||
public Text speakerText;
|
||||
public Text npcText;
|
||||
public Transform responseContainer;
|
||||
public ScrollRect responseScrollRect;
|
||||
public GameObject responseButtonPrefab;
|
||||
public Text hintText;
|
||||
public Text statusText;
|
||||
|
||||
[Header("Scene References")]
|
||||
public Inventory playerInventory;
|
||||
public SimplePlayerController playerController;
|
||||
|
||||
[Header("Typewriter")]
|
||||
public float characterDelay = 0.025f;
|
||||
|
||||
public bool IsDialogueActive { get; private set; }
|
||||
|
||||
private DialogueNode currentNode;
|
||||
private string currentNpcLine;
|
||||
private Coroutine typewriterRoutine;
|
||||
private bool isTyping;
|
||||
private string overrideSpeakerName;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (Instance != null && Instance != this)
|
||||
{
|
||||
Destroy(gameObject);
|
||||
return;
|
||||
}
|
||||
|
||||
Instance = this;
|
||||
|
||||
if (dialoguePanel != null)
|
||||
dialoguePanel.SetActive(false);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!IsDialogueActive)
|
||||
return;
|
||||
|
||||
if (isTyping && (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButtonDown(0)))
|
||||
SkipTypewriter();
|
||||
|
||||
if (Input.GetKeyDown(KeyCode.Escape))
|
||||
EndDialogue();
|
||||
}
|
||||
|
||||
public void StartDialogue(DialogueNode startNode, string npcDisplayName = null)
|
||||
{
|
||||
if (IsDialogueActive || startNode == null)
|
||||
return;
|
||||
|
||||
IsDialogueActive = true;
|
||||
overrideSpeakerName = npcDisplayName;
|
||||
|
||||
if (dialoguePanel != null)
|
||||
dialoguePanel.SetActive(true);
|
||||
|
||||
SetHint(string.Empty);
|
||||
SetStatus(string.Empty);
|
||||
|
||||
if (playerController != null)
|
||||
playerController.SetInputEnabled(false);
|
||||
else
|
||||
{
|
||||
Cursor.visible = true;
|
||||
Cursor.lockState = CursorLockMode.None;
|
||||
}
|
||||
|
||||
ShowNode(startNode);
|
||||
}
|
||||
|
||||
public void ShowNode(DialogueNode node)
|
||||
{
|
||||
if (node == null)
|
||||
{
|
||||
EndDialogue();
|
||||
return;
|
||||
}
|
||||
|
||||
currentNode = node;
|
||||
currentNpcLine = string.IsNullOrEmpty(node.npcLine) ? string.Empty : node.npcLine;
|
||||
|
||||
if (speakerText != null)
|
||||
{
|
||||
string speaker = !string.IsNullOrEmpty(node.speakerName) ? node.speakerName : overrideSpeakerName;
|
||||
speakerText.text = string.IsNullOrEmpty(speaker) ? "NPC" : speaker;
|
||||
}
|
||||
|
||||
ClearResponses();
|
||||
|
||||
if (typewriterRoutine != null)
|
||||
StopCoroutine(typewriterRoutine);
|
||||
|
||||
typewriterRoutine = StartCoroutine(TypeLine(currentNpcLine));
|
||||
}
|
||||
|
||||
public void EndDialogue()
|
||||
{
|
||||
if (!IsDialogueActive)
|
||||
return;
|
||||
|
||||
if (typewriterRoutine != null)
|
||||
{
|
||||
StopCoroutine(typewriterRoutine);
|
||||
typewriterRoutine = null;
|
||||
}
|
||||
|
||||
isTyping = false;
|
||||
currentNode = null;
|
||||
ClearResponses();
|
||||
|
||||
if (dialoguePanel != null)
|
||||
dialoguePanel.SetActive(false);
|
||||
|
||||
if (playerController != null)
|
||||
playerController.SetInputEnabled(true);
|
||||
else
|
||||
{
|
||||
Cursor.visible = false;
|
||||
Cursor.lockState = CursorLockMode.Locked;
|
||||
}
|
||||
|
||||
IsDialogueActive = false;
|
||||
SetStatus("Диалог завершён");
|
||||
}
|
||||
|
||||
public void OnResponseSelected(DialogueResponse response)
|
||||
{
|
||||
if (response == null)
|
||||
{
|
||||
EndDialogue();
|
||||
return;
|
||||
}
|
||||
|
||||
if (isTyping)
|
||||
{
|
||||
SkipTypewriter();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CheckRequirements(response))
|
||||
{
|
||||
string requiredName = response.requiredItem != null ? response.requiredItem.itemName : "предмет";
|
||||
SetStatus(!string.IsNullOrEmpty(response.unavailableText) ? response.unavailableText : "Нужен предмет: " + requiredName);
|
||||
return;
|
||||
}
|
||||
|
||||
ApplyResponseEffects(response);
|
||||
|
||||
if (response.endsDialogue || response.nextNode == null)
|
||||
EndDialogue();
|
||||
else
|
||||
ShowNode(response.nextNode);
|
||||
}
|
||||
|
||||
public void CreateResponseButton(DialogueResponse response, bool interactable, string buttonText)
|
||||
{
|
||||
if (responseContainer == null)
|
||||
return;
|
||||
|
||||
GameObject buttonObject = responseButtonPrefab != null
|
||||
? Instantiate(responseButtonPrefab, responseContainer)
|
||||
: CreateFallbackButton(responseContainer);
|
||||
|
||||
buttonObject.name = interactable ? "ResponseButton" : "ResponseButton_Disabled";
|
||||
buttonObject.SetActive(true);
|
||||
|
||||
Text label = buttonObject.GetComponentInChildren<Text>(true);
|
||||
if (label != null)
|
||||
{
|
||||
label.text = buttonText;
|
||||
label.color = interactable ? Color.white : new Color(0.68f, 0.7f, 0.73f, 1f);
|
||||
}
|
||||
|
||||
Button button = buttonObject.GetComponent<Button>();
|
||||
if (button == null)
|
||||
button = buttonObject.AddComponent<Button>();
|
||||
|
||||
button.interactable = interactable;
|
||||
button.onClick.RemoveAllListeners();
|
||||
|
||||
if (interactable)
|
||||
button.onClick.AddListener(() => OnResponseSelected(response));
|
||||
|
||||
Image image = buttonObject.GetComponent<Image>();
|
||||
if (image != null && !interactable)
|
||||
image.color = new Color(0.12f, 0.13f, 0.15f, 0.88f);
|
||||
|
||||
if (responseScrollRect != null)
|
||||
responseScrollRect.verticalNormalizedPosition = 1f;
|
||||
}
|
||||
|
||||
public bool CheckRequirements(DialogueResponse response)
|
||||
{
|
||||
if (response == null || response.requiredItem == null)
|
||||
return true;
|
||||
|
||||
if (playerInventory == null)
|
||||
return false;
|
||||
|
||||
return playerInventory.HasItem(response.requiredItem, Mathf.Max(1, response.requiredItemAmount));
|
||||
}
|
||||
|
||||
public void ApplyResponseEffects(DialogueResponse response)
|
||||
{
|
||||
if (response == null || playerInventory == null)
|
||||
return;
|
||||
|
||||
if (response.consumeRequiredItem && response.requiredItem != null)
|
||||
{
|
||||
int amount = Mathf.Max(1, response.requiredItemAmount);
|
||||
if (playerInventory.RemoveItem(response.requiredItem, amount))
|
||||
SetStatus("Списан предмет: " + response.requiredItem.itemName);
|
||||
}
|
||||
|
||||
if (response.rewardItem != null && response.rewardAmount > 0)
|
||||
{
|
||||
if (playerInventory.AddItem(response.rewardItem, response.rewardAmount))
|
||||
SetStatus("Получен предмет: " + response.rewardItem.itemName);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(response.eventId))
|
||||
Debug.Log("Dialogue event fired: " + response.eventId);
|
||||
}
|
||||
|
||||
public void SkipTypewriter()
|
||||
{
|
||||
if (!isTyping)
|
||||
return;
|
||||
|
||||
if (typewriterRoutine != null)
|
||||
{
|
||||
StopCoroutine(typewriterRoutine);
|
||||
typewriterRoutine = null;
|
||||
}
|
||||
|
||||
if (npcText != null)
|
||||
npcText.text = currentNpcLine;
|
||||
|
||||
isTyping = false;
|
||||
BuildResponseButtons();
|
||||
}
|
||||
|
||||
public void ClearResponses()
|
||||
{
|
||||
if (responseContainer == null)
|
||||
return;
|
||||
|
||||
for (int i = responseContainer.childCount - 1; i >= 0; i--)
|
||||
Destroy(responseContainer.GetChild(i).gameObject);
|
||||
}
|
||||
|
||||
public void SetStatus(string message)
|
||||
{
|
||||
if (statusText != null)
|
||||
{
|
||||
statusText.text = message;
|
||||
SetTextRootActive(statusText, !string.IsNullOrEmpty(message));
|
||||
}
|
||||
|
||||
if (DialogueHUD.Instance != null && !string.IsNullOrEmpty(message))
|
||||
DialogueHUD.Instance.SetStatus(message);
|
||||
}
|
||||
|
||||
private IEnumerator TypeLine(string line)
|
||||
{
|
||||
isTyping = true;
|
||||
|
||||
if (npcText != null)
|
||||
npcText.text = string.Empty;
|
||||
|
||||
for (int i = 0; i < line.Length; i++)
|
||||
{
|
||||
if (npcText != null)
|
||||
npcText.text = line.Substring(0, i + 1);
|
||||
|
||||
yield return new WaitForSeconds(characterDelay);
|
||||
}
|
||||
|
||||
isTyping = false;
|
||||
typewriterRoutine = null;
|
||||
BuildResponseButtons();
|
||||
}
|
||||
|
||||
private void BuildResponseButtons()
|
||||
{
|
||||
ClearResponses();
|
||||
|
||||
if (currentNode == null)
|
||||
return;
|
||||
|
||||
int visibleCount = 0;
|
||||
int interactableCount = 0;
|
||||
DialogueResponse[] responses = currentNode.responses;
|
||||
|
||||
if (responses != null)
|
||||
{
|
||||
foreach (DialogueResponse response in responses)
|
||||
{
|
||||
if (response == null)
|
||||
continue;
|
||||
|
||||
bool requirementsMet = CheckRequirements(response);
|
||||
if (!requirementsMet && response.hideIfRequirementsNotMet)
|
||||
continue;
|
||||
|
||||
string text = response.responseText;
|
||||
if (!requirementsMet)
|
||||
text = !string.IsNullOrEmpty(response.unavailableText) ? response.unavailableText : BuildUnavailableText(response);
|
||||
|
||||
CreateResponseButton(response, requirementsMet, text);
|
||||
visibleCount++;
|
||||
|
||||
if (requirementsMet)
|
||||
interactableCount++;
|
||||
}
|
||||
}
|
||||
|
||||
if (visibleCount == 0 || interactableCount == 0 || currentNode.isEndNode)
|
||||
{
|
||||
DialogueResponse closeResponse = new DialogueResponse
|
||||
{
|
||||
responseText = "До свидания.",
|
||||
endsDialogue = true
|
||||
};
|
||||
CreateResponseButton(closeResponse, true, "До свидания");
|
||||
}
|
||||
}
|
||||
|
||||
private string BuildUnavailableText(DialogueResponse response)
|
||||
{
|
||||
if (response.requiredItem == null)
|
||||
return "Недоступно";
|
||||
|
||||
int amount = Mathf.Max(1, response.requiredItemAmount);
|
||||
return amount > 1
|
||||
? "Недоступно: нужен предмет " + response.requiredItem.itemName + " x" + amount
|
||||
: "Недоступно: нужен предмет " + response.requiredItem.itemName;
|
||||
}
|
||||
|
||||
private void SetHint(string message)
|
||||
{
|
||||
if (hintText != null)
|
||||
{
|
||||
hintText.text = message;
|
||||
SetTextRootActive(hintText, !string.IsNullOrEmpty(message));
|
||||
}
|
||||
|
||||
if (DialogueHUD.Instance != null)
|
||||
{
|
||||
if (string.IsNullOrEmpty(message))
|
||||
DialogueHUD.Instance.HideHint();
|
||||
else
|
||||
DialogueHUD.Instance.ShowHint(message);
|
||||
}
|
||||
}
|
||||
|
||||
private GameObject CreateFallbackButton(Transform parent)
|
||||
{
|
||||
GameObject buttonObject = new GameObject("ResponseButton", typeof(RectTransform), typeof(Image), typeof(Button));
|
||||
buttonObject.transform.SetParent(parent, false);
|
||||
|
||||
GameObject labelObject = new GameObject("Text", typeof(RectTransform), typeof(Text));
|
||||
labelObject.transform.SetParent(buttonObject.transform, false);
|
||||
|
||||
RectTransform labelRect = labelObject.GetComponent<RectTransform>();
|
||||
labelRect.anchorMin = Vector2.zero;
|
||||
labelRect.anchorMax = Vector2.one;
|
||||
labelRect.offsetMin = new Vector2(16f, 6f);
|
||||
labelRect.offsetMax = new Vector2(-16f, -6f);
|
||||
|
||||
Text label = labelObject.GetComponent<Text>();
|
||||
label.color = Color.white;
|
||||
label.alignment = TextAnchor.MiddleLeft;
|
||||
label.font = Resources.GetBuiltinResource<Font>("Arial.ttf");
|
||||
|
||||
return buttonObject;
|
||||
}
|
||||
|
||||
private static void SetTextRootActive(Text text, bool active)
|
||||
{
|
||||
if (text == null)
|
||||
return;
|
||||
|
||||
Transform parent = text.transform.parent;
|
||||
if (parent != null && parent.GetComponent<Image>() != null)
|
||||
parent.gameObject.SetActive(active);
|
||||
else
|
||||
text.gameObject.SetActive(active);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3d5c728207b3a368ea9bfcc9e30ffb6a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "DialogueNode", menuName = "Dialogue/DialogueNode")]
|
||||
public class DialogueNode : ScriptableObject
|
||||
{
|
||||
public string nodeId;
|
||||
public string speakerName;
|
||||
|
||||
[TextArea(3, 8)]
|
||||
public string npcLine;
|
||||
|
||||
public DialogueResponse[] responses;
|
||||
public bool isEndNode;
|
||||
public string editorNote;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public class DialogueResponse
|
||||
{
|
||||
public string responseText;
|
||||
public DialogueNode nextNode;
|
||||
public bool endsDialogue;
|
||||
public ItemData requiredItem;
|
||||
public int requiredItemAmount = 1;
|
||||
public string unavailableText;
|
||||
public bool hideIfRequirementsNotMet;
|
||||
public bool consumeRequiredItem;
|
||||
public ItemData rewardItem;
|
||||
public int rewardAmount;
|
||||
public string eventId;
|
||||
public string editorNote;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 760b0a0b8bcf617edbf21f60d51169f5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public class InventorySlot
|
||||
{
|
||||
public ItemData item;
|
||||
public int amount;
|
||||
|
||||
public InventorySlot(ItemData item, int amount)
|
||||
{
|
||||
this.item = item;
|
||||
this.amount = Mathf.Max(0, amount);
|
||||
}
|
||||
}
|
||||
|
||||
public class Inventory : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private List<InventorySlot> slots = new List<InventorySlot>();
|
||||
|
||||
public event Action OnInventoryChanged;
|
||||
|
||||
public IReadOnlyList<InventorySlot> Slots => slots;
|
||||
|
||||
public bool HasItem(ItemData item, int amount)
|
||||
{
|
||||
if (item == null)
|
||||
return true;
|
||||
|
||||
return GetAmount(item) >= Mathf.Max(1, amount);
|
||||
}
|
||||
|
||||
public int GetAmount(ItemData item)
|
||||
{
|
||||
if (item == null)
|
||||
return 0;
|
||||
|
||||
InventorySlot slot = FindSlot(item);
|
||||
return slot != null ? Mathf.Max(0, slot.amount) : 0;
|
||||
}
|
||||
|
||||
public bool AddItem(ItemData item, int amount)
|
||||
{
|
||||
if (item == null || amount <= 0)
|
||||
return false;
|
||||
|
||||
InventorySlot slot = FindSlot(item);
|
||||
int maxStack = Mathf.Max(1, item.maxStack);
|
||||
|
||||
if (slot == null)
|
||||
{
|
||||
slots.Add(new InventorySlot(item, Mathf.Min(amount, maxStack)));
|
||||
RaiseChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
int newAmount = Mathf.Clamp(slot.amount + amount, 0, maxStack);
|
||||
if (newAmount == slot.amount)
|
||||
return false;
|
||||
|
||||
slot.amount = newAmount;
|
||||
RaiseChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
public bool RemoveItem(ItemData item, int amount)
|
||||
{
|
||||
if (item == null || amount <= 0)
|
||||
return false;
|
||||
|
||||
InventorySlot slot = FindSlot(item);
|
||||
if (slot == null || slot.amount < amount)
|
||||
return false;
|
||||
|
||||
slot.amount -= amount;
|
||||
if (slot.amount <= 0)
|
||||
slots.Remove(slot);
|
||||
|
||||
RaiseChanged();
|
||||
return true;
|
||||
}
|
||||
|
||||
public string GetDebugText()
|
||||
{
|
||||
if (slots.Count == 0)
|
||||
return "Инвентарь: пусто";
|
||||
|
||||
StringBuilder builder = new StringBuilder("Инвентарь: ");
|
||||
bool first = true;
|
||||
|
||||
foreach (InventorySlot slot in slots)
|
||||
{
|
||||
if (slot == null || slot.item == null || slot.amount <= 0)
|
||||
continue;
|
||||
|
||||
if (!first)
|
||||
builder.Append(", ");
|
||||
|
||||
builder.Append(slot.item.itemName);
|
||||
builder.Append(" x");
|
||||
builder.Append(slot.amount);
|
||||
first = false;
|
||||
}
|
||||
|
||||
return first ? "Инвентарь: пусто" : builder.ToString();
|
||||
}
|
||||
|
||||
private InventorySlot FindSlot(ItemData item)
|
||||
{
|
||||
return slots.Find(slot => slot != null && slot.item == item);
|
||||
}
|
||||
|
||||
private void RaiseChanged()
|
||||
{
|
||||
OnInventoryChanged?.Invoke();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 041b00ae48363aabaaf30a53abcd35ad
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
using UnityEngine;
|
||||
|
||||
[CreateAssetMenu(fileName = "ItemData", menuName = "Dialogue/ItemData")]
|
||||
public class ItemData : ScriptableObject
|
||||
{
|
||||
public string itemId;
|
||||
public string itemName;
|
||||
|
||||
[TextArea(2, 5)]
|
||||
public string description;
|
||||
|
||||
public Color itemColor = Color.white;
|
||||
public int maxStack = 99;
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 10cf6353066082490a62140ae9883b4e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,114 @@
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(SphereCollider))]
|
||||
public class NPCInteract : MonoBehaviour
|
||||
{
|
||||
public DialogueNode startNode;
|
||||
public string npcDisplayName = "Смотритель ворот";
|
||||
public float interactionRadius = 3f;
|
||||
public KeyCode interactKey = KeyCode.E;
|
||||
public DialogueManager dialogueManager;
|
||||
public Renderer highlightRenderer;
|
||||
public Color highlightColor = new Color(1f, 0.78f, 0.22f, 1f);
|
||||
|
||||
private Transform player;
|
||||
private bool playerInRange;
|
||||
private Color baseColor;
|
||||
private Material runtimeMaterial;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
SphereCollider trigger = GetComponent<SphereCollider>();
|
||||
trigger.isTrigger = true;
|
||||
trigger.radius = interactionRadius;
|
||||
|
||||
if (highlightRenderer == null)
|
||||
highlightRenderer = GetComponentInChildren<Renderer>();
|
||||
|
||||
if (highlightRenderer != null)
|
||||
{
|
||||
runtimeMaterial = highlightRenderer.material;
|
||||
baseColor = runtimeMaterial.color;
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (dialogueManager == null)
|
||||
dialogueManager = DialogueManager.Instance;
|
||||
|
||||
SimplePlayerController controller = FindObjectOfType<SimplePlayerController>();
|
||||
if (controller != null)
|
||||
player = controller.transform;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (player != null)
|
||||
SetPlayerInRange(Vector3.Distance(transform.position, player.position) <= interactionRadius);
|
||||
|
||||
bool dialogueActive = dialogueManager != null && dialogueManager.IsDialogueActive;
|
||||
|
||||
if (!playerInRange || dialogueActive)
|
||||
return;
|
||||
|
||||
ShowHint();
|
||||
|
||||
if (Input.GetKeyDown(interactKey) && startNode != null && dialogueManager != null)
|
||||
dialogueManager.StartDialogue(startNode, npcDisplayName);
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.GetComponentInParent<SimplePlayerController>() != null)
|
||||
{
|
||||
player = other.transform;
|
||||
SetPlayerInRange(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.GetComponentInParent<SimplePlayerController>() != null)
|
||||
SetPlayerInRange(false);
|
||||
}
|
||||
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
Gizmos.color = new Color(1f, 0.75f, 0.2f, 0.25f);
|
||||
Gizmos.DrawSphere(transform.position, interactionRadius);
|
||||
Gizmos.color = new Color(1f, 0.75f, 0.2f, 1f);
|
||||
Gizmos.DrawWireSphere(transform.position, interactionRadius);
|
||||
}
|
||||
|
||||
private void SetPlayerInRange(bool inRange)
|
||||
{
|
||||
if (playerInRange == inRange)
|
||||
return;
|
||||
|
||||
playerInRange = inRange;
|
||||
SetHighlight(inRange);
|
||||
|
||||
if (!inRange && DialogueHUD.Instance != null)
|
||||
DialogueHUD.Instance.HideHint();
|
||||
}
|
||||
|
||||
private void SetHighlight(bool enabled)
|
||||
{
|
||||
if (runtimeMaterial == null)
|
||||
return;
|
||||
|
||||
runtimeMaterial.color = enabled ? highlightColor : baseColor;
|
||||
}
|
||||
|
||||
private void ShowHint()
|
||||
{
|
||||
if (DialogueHUD.Instance != null)
|
||||
DialogueHUD.Instance.ShowHint("Нажмите E для разговора");
|
||||
else if (dialogueManager != null && dialogueManager.hintText != null)
|
||||
{
|
||||
dialogueManager.hintText.text = "Нажмите E для разговора";
|
||||
dialogueManager.hintText.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: df6b7e66747a822b487e1fb1c9b6e736
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,96 @@
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(SphereCollider))]
|
||||
public class PickupItem : MonoBehaviour
|
||||
{
|
||||
public ItemData item;
|
||||
public int amount = 1;
|
||||
public KeyCode interactKey = KeyCode.E;
|
||||
public float interactionRadius = 2.25f;
|
||||
public Inventory targetInventory;
|
||||
|
||||
private Transform player;
|
||||
private bool playerInRange;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
SphereCollider trigger = GetComponent<SphereCollider>();
|
||||
trigger.isTrigger = true;
|
||||
trigger.radius = interactionRadius;
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
if (targetInventory == null)
|
||||
targetInventory = FindObjectOfType<Inventory>();
|
||||
|
||||
SimplePlayerController controller = FindObjectOfType<SimplePlayerController>();
|
||||
if (controller != null)
|
||||
player = controller.transform;
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (player != null)
|
||||
SetPlayerInRange(Vector3.Distance(transform.position, player.position) <= interactionRadius);
|
||||
|
||||
if (!playerInRange || item == null || targetInventory == null)
|
||||
return;
|
||||
|
||||
if (DialogueManager.Instance != null && DialogueManager.Instance.IsDialogueActive)
|
||||
return;
|
||||
|
||||
ShowHint();
|
||||
|
||||
if (Input.GetKeyDown(interactKey) && targetInventory.AddItem(item, amount))
|
||||
{
|
||||
if (DialogueHUD.Instance != null)
|
||||
{
|
||||
DialogueHUD.Instance.SetStatus("Получен предмет: " + item.itemName);
|
||||
DialogueHUD.Instance.HideHint();
|
||||
}
|
||||
|
||||
gameObject.SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.GetComponentInParent<SimplePlayerController>() != null)
|
||||
{
|
||||
player = other.transform;
|
||||
SetPlayerInRange(true);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.GetComponentInParent<SimplePlayerController>() != null)
|
||||
SetPlayerInRange(false);
|
||||
}
|
||||
|
||||
private void OnDrawGizmosSelected()
|
||||
{
|
||||
Gizmos.color = new Color(0.2f, 0.8f, 1f, 0.25f);
|
||||
Gizmos.DrawSphere(transform.position, interactionRadius);
|
||||
Gizmos.color = new Color(0.2f, 0.8f, 1f, 1f);
|
||||
Gizmos.DrawWireSphere(transform.position, interactionRadius);
|
||||
}
|
||||
|
||||
private void SetPlayerInRange(bool inRange)
|
||||
{
|
||||
if (playerInRange == inRange)
|
||||
return;
|
||||
|
||||
playerInRange = inRange;
|
||||
|
||||
if (!inRange && DialogueHUD.Instance != null)
|
||||
DialogueHUD.Instance.HideHint();
|
||||
}
|
||||
|
||||
private void ShowHint()
|
||||
{
|
||||
if (DialogueHUD.Instance != null)
|
||||
DialogueHUD.Instance.ShowHint("Нажмите E, чтобы подобрать: " + item.itemName);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 05965783683e09fc7b4fdcb59d65f7bc
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,88 @@
|
||||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(CharacterController))]
|
||||
public class SimplePlayerController : MonoBehaviour
|
||||
{
|
||||
[Header("Movement")]
|
||||
public float moveSpeed = 4.5f;
|
||||
public float jumpForce = 1.2f;
|
||||
public float gravity = -18f;
|
||||
|
||||
[Header("Look")]
|
||||
public Camera playerCamera;
|
||||
public float mouseSensitivity = 2.2f;
|
||||
public float minPitch = -75f;
|
||||
public float maxPitch = 75f;
|
||||
|
||||
private CharacterController characterController;
|
||||
private Vector3 verticalVelocity;
|
||||
private float pitch;
|
||||
private bool inputEnabled = true;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
characterController = GetComponent<CharacterController>();
|
||||
|
||||
if (playerCamera == null)
|
||||
playerCamera = GetComponentInChildren<Camera>();
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
SetInputEnabled(true);
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (!inputEnabled)
|
||||
return;
|
||||
|
||||
Look();
|
||||
Move();
|
||||
}
|
||||
|
||||
public void SetInputEnabled(bool enabled)
|
||||
{
|
||||
inputEnabled = enabled;
|
||||
|
||||
if (!enabled)
|
||||
verticalVelocity = Vector3.zero;
|
||||
|
||||
Cursor.visible = !enabled;
|
||||
Cursor.lockState = enabled ? CursorLockMode.Locked : CursorLockMode.None;
|
||||
}
|
||||
|
||||
private void Look()
|
||||
{
|
||||
float yaw = Input.GetAxis("Mouse X") * mouseSensitivity;
|
||||
float pitchDelta = Input.GetAxis("Mouse Y") * mouseSensitivity;
|
||||
|
||||
transform.Rotate(Vector3.up * yaw);
|
||||
pitch = Mathf.Clamp(pitch - pitchDelta, minPitch, maxPitch);
|
||||
|
||||
if (playerCamera != null)
|
||||
playerCamera.transform.localEulerAngles = new Vector3(pitch, 0f, 0f);
|
||||
}
|
||||
|
||||
private void Move()
|
||||
{
|
||||
bool grounded = characterController.isGrounded;
|
||||
if (grounded && verticalVelocity.y < 0f)
|
||||
verticalVelocity.y = -2f;
|
||||
|
||||
float horizontal = Input.GetAxis("Horizontal");
|
||||
float vertical = Input.GetAxis("Vertical");
|
||||
Vector3 move = transform.right * horizontal + transform.forward * vertical;
|
||||
|
||||
if (move.sqrMagnitude > 1f)
|
||||
move.Normalize();
|
||||
|
||||
characterController.Move(move * (moveSpeed * Time.deltaTime));
|
||||
|
||||
if (grounded && Input.GetKeyDown(KeyCode.Space))
|
||||
verticalVelocity.y = Mathf.Sqrt(jumpForce * -2f * gravity);
|
||||
|
||||
verticalVelocity.y += gravity * Time.deltaTime;
|
||||
characterController.Move(verticalVelocity * Time.deltaTime);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0993d8504dc71019bbeb442778b3b51
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user