Browse Source
commit bd18970c8c953b209ffbe8750fc381a44947ac02
Author: Devin Braune <devin@devinbraune.de>
Date: Mon Feb 1 22:54:17 2021 +0100
Initial Unity commit
master
160 changed files with 50424 additions and 0 deletions
@ -0,0 +1,25 @@ |
|||
|
|||
Microsoft Visual Studio Solution File, Format Version 11.00 |
|||
# Visual Studio 2010 |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SAShop", "SAShop.csproj", "{09b0f6da-f88e-e1ab-0556-77ed85a56952}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests", "Tests.csproj", "{cb01dbb6-b7ff-2b65-8df2-553786a3d883}" |
|||
EndProject |
|||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp.csproj", "{391e6751-152b-cb04-5a33-c1af9eba7204}" |
|||
EndProject |
|||
Global |
|||
GlobalSection(SolutionConfigurationPlatforms) = preSolution |
|||
Debug|Any CPU = Debug|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(ProjectConfigurationPlatforms) = postSolution |
|||
{09b0f6da-f88e-e1ab-0556-77ed85a56952}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{09b0f6da-f88e-e1ab-0556-77ed85a56952}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{cb01dbb6-b7ff-2b65-8df2-553786a3d883}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{cb01dbb6-b7ff-2b65-8df2-553786a3d883}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
{391e6751-152b-cb04-5a33-c1af9eba7204}.Debug|Any CPU.ActiveCfg = Debug|Any CPU |
|||
{391e6751-152b-cb04-5a33-c1af9eba7204}.Debug|Any CPU.Build.0 = Debug|Any CPU |
|||
EndGlobalSection |
|||
GlobalSection(SolutionProperties) = preSolution |
|||
HideSolutionNode = FALSE |
|||
EndGlobalSection |
|||
EndGlobal |
|||
@ -0,0 +1,71 @@ |
|||
<?xml version="1.0" encoding="utf-8"?> |
|||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|||
<PropertyGroup> |
|||
<LangVersion>latest</LangVersion> |
|||
<_TargetFrameworkDirectories>non_empty_path_generated_by_unity.rider.package</_TargetFrameworkDirectories> |
|||
<_FullFrameworkReferenceAssemblyPaths>non_empty_path_generated_by_unity.rider.package</_FullFrameworkReferenceAssemblyPaths> |
|||
<DisableHandlePackageFileConflicts>true</DisableHandlePackageFileConflicts> |
|||
</PropertyGroup> |
|||
<PropertyGroup> |
|||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|||
<ProductVersion>10.0.20506</ProductVersion> |
|||
<SchemaVersion>2.0</SchemaVersion> |
|||
<RootNamespace></RootNamespace> |
|||
<ProjectGuid>{391e6751-152b-cb04-5a33-c1af9eba7204}</ProjectGuid> |
|||
<ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> |
|||
<OutputType>Library</OutputType> |
|||
<AppDesignerFolder>Properties</AppDesignerFolder> |
|||
<AssemblyName>Assembly-CSharp</AssemblyName> |
|||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion> |
|||
<FileAlignment>512</FileAlignment> |
|||
<BaseDirectory>.</BaseDirectory> |
|||
</PropertyGroup> |
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|||
<DebugSymbols>true</DebugSymbols> |
|||
<DebugType>full</DebugType> |
|||
<Optimize>false</Optimize> |
|||
<OutputPath>Temp/Bin/Debug</OutputPath> |
|||
<DefineConstants></DefineConstants> |
|||
<ErrorReport>prompt</ErrorReport> |
|||
<WarningLevel>4</WarningLevel> |
|||
<NoWarn></NoWarn> |
|||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
|||
<TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
|||
</PropertyGroup> |
|||
<PropertyGroup> |
|||
<NoConfig>true</NoConfig> |
|||
<NoStdLib>true</NoStdLib> |
|||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences> |
|||
<ImplicitlyExpandNETStandardFacades>false</ImplicitlyExpandNETStandardFacades> |
|||
<ImplicitlyExpandDesignTimeFacades>false</ImplicitlyExpandDesignTimeFacades> |
|||
</PropertyGroup> |
|||
<ItemGroup> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMPro.cginc" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_SDF-Mobile Overlay.shader" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_Bitmap.shader" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_SDF-Surface-Mobile.shader" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_SDF-Surface.shader" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Sprites\EmojiOne Attribution.txt" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_Bitmap-Custom-Atlas.shader" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_SDF.shader" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\LineBreaking Leading Characters.txt" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMPro_Properties.cginc" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMPro_Surface.cginc" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\LineBreaking Following Characters.txt" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_SDF-Mobile Masking.shader" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_SDF Overlay.shader" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_Bitmap-Mobile.shader" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Fonts\LiberationSans - OFL.txt" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_SDF-Mobile.shader" /> |
|||
<None Include="Assets\Unity Packages\TextMesh Pro\Resources\Shaders\TMP_Sprite.shader" /> |
|||
</ItemGroup> |
|||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> |
|||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|||
Other similar extension points exist, see Microsoft.Common.targets. |
|||
<Target Name="BeforeBuild"> |
|||
</Target> |
|||
<Target Name="AfterBuild"> |
|||
</Target> |
|||
--> |
|||
</Project> |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 69c8f9a5eb2e04c3c908d8787cb841ff |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
File diff suppressed because it is too large
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: f7e4aca495e6b46c1b69e85db31ac803 |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
File diff suppressed because it is too large
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 2217ade0fb51b46daa2e279fbf1589d7 |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 536e665d4d4c04e7a8f75aad9c10b0f2 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,15 @@ |
|||
%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: 51e92545172ea4ce896dd37e45138887, type: 3} |
|||
m_Name: ViewConfig |
|||
m_EditorClassIdentifier: |
|||
gridViewColumnCount: 10 |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 5d1182a6d5a724428b8167840f0dfa92 |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 4d8a3ff097ff74f7ea25a4b8033112de |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
File diff suppressed because it is too large
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 2cda990e2423bbf4892e6590ba056729 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
File diff suppressed because it is too large
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 3ee6fb3c35770f34caf82c5b9d65c5c6 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 3de2ce135ee9d4458a8890d872aabc2d |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 4c09f430746bc4657bae93df653e4a7b |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 4d22b73caf3d34bf0b31e6b856805114 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,79 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
/// <summary>
|
|||
/// This class provides a keyboard controller for a ShopModel in a grid view, it defines how to handle keyboard input in HandleInput()
|
|||
/// </summary>
|
|||
public class GridViewKeyboardController : ShopController |
|||
{ |
|||
private ViewConfig viewConfig;//To move the focus up and down, we need to know how many columns the grid view has, in the current setup,
|
|||
private int columnCount; //this information can be found in a ViewConfig scriptable object, which serves as a configuration file for
|
|||
//views.
|
|||
|
|||
private int currentItemIndex = 0;//The current item index is changed whenever the focus is moved with keyboard keys
|
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// Initialize()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Override Initialize to set up additional information needed by this concrete controller: number of columns in the view
|
|||
public override ShopController Initialize(ShopModel pShopModel) |
|||
{ |
|||
base.Initialize(pShopModel);//Call base.Initialize to set up the model
|
|||
currentItemIndex = model.GetSelectedItemIndex();//Synchronize the current item index with the model
|
|||
viewConfig = Resources.Load<ViewConfig>("ViewConfig");//Load the ViewConfig scriptable object from the Resources folder
|
|||
Debug.Assert(viewConfig != null); |
|||
columnCount = viewConfig.gridViewColumnCount;//Try to set up the column count, fails silently
|
|||
return this; |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// HandleInput()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Currently hardcoded to AWSD to move focus and K to confirm the selected item
|
|||
public override void HandleInput() |
|||
{ |
|||
//Move the focus to the left if possible
|
|||
if (Input.GetKeyDown(KeyCode.A)) |
|||
{ |
|||
currentItemIndex--; |
|||
if (currentItemIndex < 0) |
|||
{ |
|||
currentItemIndex = 0; |
|||
} |
|||
} |
|||
|
|||
//Move the focus to the right if possible
|
|||
if (Input.GetKeyDown(KeyCode.D)) |
|||
{ |
|||
currentItemIndex++; |
|||
if (currentItemIndex >= this.Model.inventory.GetItemCount()) |
|||
{ |
|||
currentItemIndex = this.Model.inventory.GetItemCount() - 1; |
|||
} |
|||
} |
|||
|
|||
//Move the focus up if possible
|
|||
if (Input.GetKeyDown(KeyCode.W)) |
|||
{ |
|||
if (currentItemIndex > columnCount - 1) |
|||
currentItemIndex -= columnCount; |
|||
} |
|||
|
|||
//Move the focus down if possible
|
|||
if (Input.GetKeyDown(KeyCode.S)) |
|||
{ |
|||
; if (currentItemIndex < this.Model.inventory.GetItemCount() - columnCount) |
|||
currentItemIndex += columnCount; |
|||
} |
|||
|
|||
//Select the item
|
|||
SelectItemByIndex(currentItemIndex); |
|||
|
|||
//Confirm the selected item when K is pressed
|
|||
if (Input.GetKeyDown(KeyCode.K)) |
|||
{ |
|||
ConfirmSelectedItem(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,12 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 43ad5fa077d12435dbe9e851e9c696f2 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: |
|||
- viewConfig: {fileID: 11400000, guid: 5d1182a6d5a724428b8167840f0dfa92, type: 2} |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,54 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine.EventSystems; |
|||
using UnityEngine; |
|||
|
|||
/// <summary>
|
|||
/// This class provides a mouse controller for a ShopModel, it receives UI events such as button clicks from the view and
|
|||
/// munipluates the model it controls. It implements UnityEngine.EventSystems's IPointerClickerHandler to receive mouse click
|
|||
/// events
|
|||
/// </summary>
|
|||
public class MouseController : ShopController, IPointerClickHandler |
|||
{ |
|||
private Item itemToSelect;//The item that will be selected the next time HandleInput is called
|
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// HandleInput()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//If there is an item to select, call SelectItem to select it.
|
|||
public override void HandleInput() |
|||
{ |
|||
GetMouseInput(); |
|||
} |
|||
|
|||
public void GetMouseInput() |
|||
{ |
|||
if (itemToSelect != null) |
|||
{ |
|||
SelectItem(itemToSelect); |
|||
itemToSelect = null;//Now that the item was selected, set itemToSelect back to null
|
|||
} |
|||
} |
|||
|
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// OnPointerClick()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//This method is called everytime the view receives a mouse click event
|
|||
public void OnPointerClick(PointerEventData eventData) |
|||
{ |
|||
//Check if the mouse clicked on an item container.
|
|||
IItemContainer itemContainer = eventData.pointerCurrentRaycast.gameObject.GetComponent<IItemContainer>(); |
|||
|
|||
//If the game object that was clicked on has a component which implements the IItemContainer interface, itemContainer
|
|||
//will be assigned with that component, otherwise itemContainer would be null, meaning the mouse didn't click on any
|
|||
//item containers in the view. If you are clicking on the item container but it still returns null, check to see if there
|
|||
//is any other UI elements blocking the raycast, if so mark their 'Raycast Target' property as false in Unity Editor
|
|||
if (itemContainer != null) |
|||
{ |
|||
itemToSelect = itemContainer.Item;//Use IItemContainer's getter to get the item in the container, assign it to itemToSelect,
|
|||
//now it will be selected the next time HandleInput is called
|
|||
|
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 5cbeccfecd58d46b6b667ca058198ce4 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,54 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
/// <summary>
|
|||
/// This class defines the methods to be called by views to control a ShopModel. You can make concrete
|
|||
/// controllers like a mouse controller, keyboard controller, gamepad controller, etc from this interface.
|
|||
/// </summary>
|
|||
public abstract class ShopController : MonoBehaviour |
|||
{ |
|||
public ShopModel Model => model;//Public getter for the model
|
|||
protected ShopModel model; //Ties this controller to a ShopModel
|
|||
|
|||
public abstract void HandleInput(); //Concrete controllers override this method and handle input in different ways.
|
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// Initialize()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Used as the equivalence of a constructor since we can't use new to create a MonoBehaviour, marked as virtual so that
|
|||
//concrete controllers can add their own Initialize methods
|
|||
public virtual ShopController Initialize(ShopModel pModel) |
|||
{ |
|||
model = pModel; |
|||
return this; |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// SelectItem()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Called when a certain item is selected
|
|||
public void SelectItem(Item item) |
|||
{ |
|||
model.SelectItem(item); |
|||
} |
|||
|
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// SelectItemByIndex()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Select an item by its index
|
|||
public void SelectItemByIndex(int index) |
|||
{ |
|||
model.SelectItemByIndex(index); |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// ConfirmSelectedItem()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Tells the model to confirm the current selected item
|
|||
public void ConfirmSelectedItem() |
|||
{ |
|||
model.ConfirmSelectedItem(); |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 52d2652449e83440ea952683aa4daf61 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: bbdad380f04d845de8592fcab03e2501 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,26 @@ |
|||
using System; |
|||
using System.Configuration; |
|||
|
|||
/// <summary>
|
|||
/// This is a concrete, empty model for the buy state of the shop for you to implement
|
|||
/// </summary>
|
|||
public class BuyModel : ShopModel |
|||
{ |
|||
public BuyModel(float pPriceModifier, int pItemCount, int pMoney) : base(pPriceModifier, pItemCount, pMoney) |
|||
{ |
|||
|
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// ConfirmSelectedItem()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Currently it just removes the selected item from the shop's inventory, rewrite this function and don't forget the unit test.
|
|||
|
|||
public override void ConfirmSelectedItem() |
|||
{ |
|||
OnRemove(GetSelectedItem()); // If there's a view subscribed, this will probably remove the item from it
|
|||
inventory.RemoveItemByIndex(selectedItemIndex); // Before removing the item from the model's actual inventory
|
|||
SelectItemByIndex(--selectedItemIndex); |
|||
} |
|||
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: d5382b44eb07444e68f9dfd113231e63 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,108 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
|
|||
/// <summary>
|
|||
/// This class defines a basic inventory
|
|||
/// </summary>
|
|||
public class Inventory |
|||
{ |
|||
public int Money { get; }//Getter for the money, the views need it to display the amount of money.
|
|||
private List<Item> itemList = new List<Item>(); //Items in the inventory
|
|||
|
|||
//Set up the inventory with item count and money
|
|||
public Inventory(int pItemCount, int pMoney) |
|||
{ |
|||
PopulateInventory(pItemCount); |
|||
Money = pMoney; |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// GetItems()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Returns a list with all current items in the shop.
|
|||
public List<Item> GetItems() |
|||
{ |
|||
return new List<Item>(itemList); //Returns a copy of the list, so the original is kept intact,
|
|||
//however this is shallow copy of the original list, so changes in
|
|||
//the original list will likely influence the copy, apply
|
|||
//creational patterns like prototype to fix this.
|
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// GetItemCount()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Returns the number of items
|
|||
public int GetItemCount() |
|||
{ |
|||
return itemList.Count; |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// GetItemByIndex()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Attempts to get an item, specified by index, returns null if unsuccessful. Depends on how you set up your shop, it might be
|
|||
//a good idea to return a copy of the original item.
|
|||
public Item GetItemByIndex(int index) |
|||
{ |
|||
if (index >= 0 && index < itemList.Count) |
|||
{ |
|||
return itemList[index]; |
|||
} |
|||
else |
|||
{ |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// AddItem()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Adds an item to the inventory's item list.
|
|||
public void AddItem(Item item) |
|||
{ |
|||
itemList.Add(item);//In your setup, what would happen if you add an item that's already existed in the list?
|
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// RemoveItem()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Attempts to remove an item, fails silently.
|
|||
public void Remove(Item item) |
|||
{ |
|||
if (itemList.Contains(item)) |
|||
{ |
|||
itemList.Remove(item); |
|||
} |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// RemoveItemByIndex()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Attempts to remove an item, specified by index, fails silently.
|
|||
public void RemoveItemByIndex(int index) |
|||
{ |
|||
if (index >= 0 && index < itemList.Count) |
|||
{ |
|||
itemList.RemoveAt(index); |
|||
} |
|||
} |
|||
|
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// PopulateInventory()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//This is obviously not how you should generate items. For this assignment you need either an abstract item factory, or
|
|||
//make this into a factory method.
|
|||
|
|||
private void PopulateInventory(int itemCount) |
|||
{ |
|||
Random random = new Random(); |
|||
for (int index = 0; index < itemCount; index++) |
|||
{ |
|||
Item item = new Item("Student Sword", "items_" + random.Next(73, 145), 50); //item name, item icon, cost
|
|||
itemList.Add(item); |
|||
} |
|||
} |
|||
//Think of other necessary functions for the inventory based on your design of the shop. Don't forget to unit test all the functions.
|
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 22a3d7a30fe2f468bb602bd2acb5da29 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,22 @@ |
|||
/// <summary>
|
|||
/// This class holds data for an Item. Currently it has a name, an iconName and a base price.
|
|||
/// </summary>
|
|||
public class Item |
|||
{ |
|||
public readonly string name; |
|||
public readonly string iconName; |
|||
public int basePrice { get; private set; } // This is the base price for the item, the buying and selling prices can be
|
|||
// generated based on this value.
|
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// Item()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
public Item(string name, string iconName, int pbasePrice) |
|||
{ |
|||
this.name = name; |
|||
this.iconName = iconName; |
|||
this.basePrice = pbasePrice; |
|||
} |
|||
|
|||
} |
|||
|
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 77a43f968bfac48c2a718cc64c9f3a4a |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,121 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
/// <summary>
|
|||
///This class holds the model of our Shop. It contains an inventory, a price modifier, and an index to select the items.
|
|||
///In its current setup, view and controller need to get data via polling. Advisable is, to apply observer pattern or
|
|||
///set up an event system for better integration with View and Controller.
|
|||
/// </summary>
|
|||
public abstract class ShopModel : IModelObservable<Item> |
|||
{ |
|||
public Inventory inventory { get; } // Getter of the inventory, the views might need this to set up the display.
|
|||
protected float priceModifier; //Modifies the item's price based on its base price
|
|||
protected int selectedItemIndex = 0; //selected item index
|
|||
|
|||
private List<IShopModelObserver<Item>> observers = new List<IShopModelObserver<Item>>(); |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// ShopModel()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
public ShopModel(float pPriceModifier, int pItemCount, int pMoney) |
|||
{ |
|||
inventory = new Inventory(pItemCount, pMoney); |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// GetSelectedItem()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Returns the selected item
|
|||
public Item GetSelectedItem() |
|||
{ |
|||
if (selectedItemIndex >= 0 && selectedItemIndex < inventory.GetItemCount()) |
|||
{ |
|||
return inventory.GetItemByIndex(selectedItemIndex); |
|||
} |
|||
else |
|||
{ |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// SelectItemByIndex()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Attempts to select the item, specified by 'index', fails silently
|
|||
public void SelectItemByIndex(int index) |
|||
{ |
|||
if (index >= 0 && index < inventory.GetItemCount()) |
|||
{ |
|||
selectedItemIndex = index; |
|||
OnSelect(GetSelectedItem()); |
|||
} |
|||
else |
|||
{ |
|||
throw new ArgumentOutOfRangeException(); |
|||
} |
|||
} |
|||
|
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// SelectItem(Item item)
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Attempts to select the given item, fails silently
|
|||
public void SelectItem(Item item) |
|||
{ |
|||
if (item != null) |
|||
{ |
|||
int index = inventory.GetItems().IndexOf(item); |
|||
if (index >= 0) |
|||
{ |
|||
SelectItemByIndex(index); |
|||
} |
|||
} |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// GetSelectedItemIndex()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//returns the index of the current selected item
|
|||
public int GetSelectedItemIndex() |
|||
{ |
|||
return selectedItemIndex; |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// Confirm()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Concrete classes to implement
|
|||
public abstract void ConfirmSelectedItem(); |
|||
|
|||
// Observer pattern. Anything that wants to know what happens regarding item selection subscribes to this.
|
|||
// This could mean all items of this model and its views do it, or all views do it.
|
|||
public IDisposable RegisterObserver(IShopModelObserver<Item> observer) |
|||
{ |
|||
// Check whether observer is already registered. If not, add it
|
|||
if (! observers.Contains(observer)) { |
|||
observers.Add(observer); |
|||
// Provide observer with existing data.
|
|||
observer.OnSelected(GetSelectedItem()); |
|||
} |
|||
return new Unsubscriber<Item>(observers, observer); |
|||
} |
|||
|
|||
public void RemoveObserver(IShopModelObserver<Item> observer) |
|||
{ |
|||
if (observers.Contains(observer)) |
|||
observers.Remove(observer); |
|||
} |
|||
|
|||
public void OnRemove(Item val) |
|||
{ |
|||
foreach (var observer in observers) |
|||
observer.OnRemoved(val); |
|||
} |
|||
|
|||
public void OnSelect(Item val) |
|||
{ |
|||
foreach (var observer in observers) |
|||
observer.OnSelected(val); |
|||
} |
|||
} |
|||
|
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: e907239028d99408d9a25c2bf5738e01 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,31 @@ |
|||
{ |
|||
"name": "SAShop", |
|||
"references": [ |
|||
"GUID:6055be8ebefd69e48b49212b09b47b2f" |
|||
], |
|||
"includePlatforms": [], |
|||
"excludePlatforms": [ |
|||
"Android", |
|||
"CloudRendering", |
|||
"iOS", |
|||
"LinuxStandalone64", |
|||
"Lumin", |
|||
"macOSStandalone", |
|||
"PS4", |
|||
"Stadia", |
|||
"Switch", |
|||
"tvOS", |
|||
"WSA", |
|||
"WebGL", |
|||
"WindowsStandalone32", |
|||
"WindowsStandalone64", |
|||
"XboxOne" |
|||
], |
|||
"allowUnsafeCode": false, |
|||
"overrideReferences": false, |
|||
"precompiledReferences": [], |
|||
"autoReferenced": true, |
|||
"defineConstraints": [], |
|||
"versionDefines": [], |
|||
"noEngineReferences": false |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: e44a8b77690124e0782b6a2ff63c0044 |
|||
AssemblyDefinitionImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 44e20f055ce5f40fc813b2434a1e9157 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,16 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
|
|||
/// <summary>
|
|||
/// This scriptable object saves global configuration for views, to use it in a similar way as a singleton, create ViewConfig object and put it in Resources
|
|||
/// folder, then classes can use Resources.Load to access the needed values, see examples of this usage in the GridViewKeyboardController and ShopGridBuyView
|
|||
/// classes
|
|||
/// </summary>
|
|||
[CreateAssetMenu]//Allows creating ViewConfig objects in Assets -> Create menu in the Unity Editor
|
|||
public class ViewConfig : ScriptableObject |
|||
{ |
|||
|
|||
|
|||
public int gridViewColumnCount; |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 51e92545172ea4ce896dd37e45138887 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 3a4df2463eb2845cb91b86adeac29f17 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,102 @@ |
|||
using System.Collections; |
|||
using NUnit.Framework; |
|||
using UnityEngine; |
|||
using UnityEngine.SceneManagement; |
|||
using UnityEngine.TestTools; |
|||
|
|||
namespace Tests |
|||
{ |
|||
public class ShopUnitTests |
|||
{ |
|||
private ShopView shopView; //This is the grid buy view we want to test
|
|||
|
|||
//Setup the test scene
|
|||
[OneTimeSetUp] |
|||
public void LoadShopScene() |
|||
{ |
|||
// Load the Scene to do unit test. In the scope of this project, this is fine. In a more complicated project, a game scene could take
|
|||
// a long time to load, in which case it's better to create test scenes to do unit tests
|
|||
SceneManager.LoadScene(0); |
|||
} |
|||
|
|||
//Setup the unit tests here
|
|||
[UnitySetUp] |
|||
public IEnumerator SetupTests() |
|||
{ |
|||
yield return |
|||
null; //yield return null skips one frame, this is to make sure that this happens after the scene is loaded
|
|||
|
|||
//The shop scene only contains one grid buy view, we use Resources.FindObjectsOfTypeAll to get the reference to it,
|
|||
//Resources.FFindObjectsOfTypeAll is used instead of GameObject.Find because the later can't find disabled objects
|
|||
shopView = Resources.FindObjectsOfTypeAll<ShopViewGrid>()[0]; |
|||
|
|||
//Active the gridBuyView game object to initialize the class, if we don't do this 'void Start()' won't be called
|
|||
//You should active all the game objects that are involved in the test before testing the functions from their components
|
|||
shopView.gameObject.SetActive(true); |
|||
} |
|||
|
|||
// Use meaningful name for your test cases, this case tests if the ShopGridBuyView component has initialized its ShopModel property
|
|||
[UnityTest] |
|||
public IEnumerator ShopGridBuyViewInitializedShopModel() |
|||
{ |
|||
yield return null; //yield return null skips one frame, waits for the Unity scene to load
|
|||
|
|||
//now test if a ShopModel is assigned to gridBuyView
|
|||
Assert.IsNotNull(shopView.ShopModel, "No Model is assigned in ShopView"); |
|||
} |
|||
|
|||
//This case tests if the grid buy view displays the correct amount of Items
|
|||
[UnityTest] |
|||
public IEnumerator ShopGridBuyViewDisplaysCorrectAmountOfItems() |
|||
{ |
|||
yield return null; //yield return null skips one frame, waits for the Unity scene to load
|
|||
|
|||
//Now that the scene is loaded and the gridBuyView game object was activated in SetupTests(), we can use GameObject.Find
|
|||
//to find the game object we want to test
|
|||
GameObject gridItemsPanel = GameObject.Find("GridItemsPanel"); |
|||
|
|||
yield return |
|||
new WaitForEndOfFrame(); //Since we are testing how many items are displayed, we should use WaitForEndOfFrame to wait until the end of the frame,
|
|||
//so that the view finished updating and rendering everything
|
|||
|
|||
int itemCount = gridItemsPanel.transform.childCount; |
|||
Assert.AreEqual(shopView.ShopModel.inventory.GetItemCount(), itemCount, |
|||
"The generated item count is not equal to shopModel's itemCount"); |
|||
} |
|||
|
|||
//This case tests if the buyModel can throw an ArgumentOutOfRangeException when it's asked to select an item by a negative
|
|||
//index. Incorrect indexes can be generated from bugs in views or controllers, throwing the correct type of exceptions is
|
|||
//better than failing silently for debugging. Your unit tests should cover exception handlings
|
|||
[UnityTest] |
|||
public IEnumerator ShopModelThrowsExceptionsWhenSelectingNegativeIndex() |
|||
{ |
|||
//yield return null skips one frame, waits for the Unity scene to load and buyModel to be assigned
|
|||
yield return null; |
|||
|
|||
//Creates a delegate that call gridBuyView.ShopModel.SelectItemByIndex(-1), the test runner will run the function, and
|
|||
//check if an ArgumentOutOfRangeException is thrown, the unit test would fail if no ArgumentOutOfRangeException
|
|||
//was thrown
|
|||
Assert.Throws<System.ArgumentOutOfRangeException>(delegate |
|||
{ |
|||
shopView.ShopModel.SelectItemByIndex(-1); |
|||
}); |
|||
} |
|||
|
|||
//This case tests whether info panels and selection highlights work correctly when a specific item is selected, while disabling correctly when it is unselected
|
|||
[UnityTest] |
|||
public IEnumerator UpdateViewItemInfoPanelAndSelection() |
|||
{ |
|||
yield return null; |
|||
|
|||
Item item = shopView.ShopModel.GetSelectedItem(); |
|||
//Creates a delegate that call gridBuyView.ShopModel.SelectItemByIndex(-1), the test runner will run the function, and
|
|||
//check if an ArgumentOutOfRangeException is thrown, the unit test would fail if no ArgumentOutOfRangeException
|
|||
//was thrown
|
|||
Assert.Throws<System.Exception>(delegate |
|||
{ |
|||
shopView.OnSelected(item); |
|||
},"Error selecting specified item"); |
|||
Assert.IsFalse(true,"Previous item is still selected!"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 2b27f546559464b5bbb2f0fe6e5d8c0b |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,21 @@ |
|||
{ |
|||
"name": "Tests", |
|||
"references": [ |
|||
"UnityEngine.TestRunner", |
|||
"UnityEditor.TestRunner", |
|||
"SAShop" |
|||
], |
|||
"includePlatforms": [], |
|||
"excludePlatforms": [], |
|||
"allowUnsafeCode": false, |
|||
"overrideReferences": true, |
|||
"precompiledReferences": [ |
|||
"nunit.framework.dll" |
|||
], |
|||
"autoReferenced": false, |
|||
"defineConstraints": [ |
|||
"UNITY_INCLUDE_TESTS" |
|||
], |
|||
"versionDefines": [], |
|||
"noEngineReferences": false |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: a253f5c21a9b54587a5e3aefb0b727f3 |
|||
AssemblyDefinitionImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: cab23cfc6a5a74b139cee63cd0d07913 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,58 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
using UnityEngine.U2D; |
|||
|
|||
/// <summary>
|
|||
/// This class is applied to a button that represents an Item in the View. It is a visual representation of the item
|
|||
/// when it is visible in the store. The class holds a link to the original Item, it sets the icon of the button to
|
|||
/// the one specified in the Item data, and it enables or disables the infoPanel to indicate if the item is selected
|
|||
/// and display the details of the item.
|
|||
/// </summary>
|
|||
public class GridViewItemContainer : MonoBehaviour, IItemContainer |
|||
{ |
|||
public Item Item => item;//Public getter for the item, required by IItemContainer interface.
|
|||
public bool IsSelected { get; } |
|||
|
|||
|
|||
//Link to the highlight image (set in prefab)
|
|||
[SerializeField] |
|||
private GameObject highLight; |
|||
|
|||
//Link to the infomation panel (set in prefab)
|
|||
[SerializeField] |
|||
private GameObject infoPanel; |
|||
|
|||
[SerializeField] |
|||
private Image icon; |
|||
|
|||
//Link to the atlas of all the item icons, use to retrieve sprites for items. For more information of the API check:
|
|||
// https://docs.unity3d.com/2019.3/Documentation/Manual/class-SpriteAtlas.html
|
|||
[SerializeField] |
|||
private SpriteAtlas iconAtlas; |
|||
|
|||
//link to the original item (set in Initialize)
|
|||
private Item item; |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// Initialize()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
public void Initialize(Item item, bool isSelected) { |
|||
//Stores the item
|
|||
this.item = item; |
|||
|
|||
//Sets the highlight image and infoPanel's visibility
|
|||
if (isSelected) { |
|||
highLight.SetActive(true); |
|||
infoPanel.SetActive(true); |
|||
} |
|||
|
|||
// Clones the first Sprite in the icon atlas that matches the iconName and uses it as the sprite of the icon image.
|
|||
Sprite sprite = iconAtlas.GetSprite(item.iconName); |
|||
|
|||
if (sprite != null) { |
|||
icon.sprite = sprite; |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 18e56b5ad6b9b4ee6a4140dc9464ce4f |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,13 @@ |
|||
using System; |
|||
|
|||
/// <summary>
|
|||
/// This interface defines an item container in a view, the container must have a getter to the item it contained,
|
|||
/// a controller can use this interface to get access to an item displayed in a view, without knowing the detailed
|
|||
/// implementation of how the container displays the item.
|
|||
/// </summary>
|
|||
public interface IItemContainer |
|||
{ |
|||
Item Item { get; } |
|||
|
|||
bool IsSelected { get; } |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: a97eca053cb74404ca37decd3aa079a8 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,18 @@ |
|||
using System; |
|||
|
|||
/// <summary>
|
|||
/// This interface defines a subject that can select an item. This is the IItemContainer counterpart of the observer
|
|||
/// pattern. It is used so that either items can directly observe, and know whether to be active or not, or
|
|||
/// a shop view can tell the items what to do, active or not.
|
|||
/// </summary>
|
|||
public interface IItemSelector |
|||
{ |
|||
// Require some way to register observers so that they can be notified when selection changes
|
|||
void RegisterOnSelect(IItemContainer observer); |
|||
void RemoveOnSelect(IItemContainer observer); |
|||
void OnSelect(Item selected); |
|||
|
|||
// Actual selection methods, so we have a selection to begin with
|
|||
void SelectItem(Item selected); |
|||
void SelectItemByIndex(int index); |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: cc3321f95d3a53d42a015c46037a5fc5 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,32 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
/// <summary>
|
|||
/// This interface defines an action observer. It implements a generic observer pattern and can be reused,
|
|||
/// but its main usage in this project is to make the view update whenever the shop model changes.
|
|||
/// </summary>
|
|||
public interface IShopModelObserver<T> |
|||
{ |
|||
void OnSelected(T item); |
|||
void OnRemoved(T item); |
|||
void OnAdded(T item); |
|||
} |
|||
|
|||
// Unsubscriber, so the observer can self-unsubscribe from this observable without any coupling
|
|||
public class Unsubscriber<T> : IDisposable |
|||
{ |
|||
private List<IShopModelObserver<T>> _observers; |
|||
private IShopModelObserver<T> _observer; |
|||
|
|||
internal Unsubscriber(List<IShopModelObserver<T>> observers, IShopModelObserver<T> observer) |
|||
{ |
|||
this._observers = observers; |
|||
this._observer = observer; |
|||
} |
|||
|
|||
public void Dispose() |
|||
{ |
|||
if (_observers.Contains(_observer)) |
|||
_observers.Remove(_observer); |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: e7c5e0563404e2349b4edf44d6cdafc0 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,15 @@ |
|||
using System; |
|||
using System.Collections.Generic; |
|||
|
|||
/// <summary>
|
|||
/// This interface defines an observable. Since registering those is fairly generic, we also just keep a generic one around.
|
|||
/// Works somewhat similar to IObservable<T>, except that it's our own really.
|
|||
/// While we use generics here, theoretically hardcoding Item types would do the job
|
|||
/// </summary>
|
|||
public interface IModelObservable<T> |
|||
{ |
|||
IDisposable RegisterObserver(IShopModelObserver<T> observer); |
|||
void RemoveObserver(IShopModelObserver<T> observer); |
|||
void OnRemove(T val); |
|||
void OnSelect(T val); |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 9f31abced52d7a74898af508f242c53b |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,168 @@ |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using System.Drawing; |
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
using TMPro; |
|||
|
|||
/// <summary>
|
|||
/// This class connects a grid view for buy state of the shop to a controller to manipulate the BuyModel via a ShopController
|
|||
/// interface, it contains specific methods to setup and update a grid view, with the data from a BuyModel. If you want to display
|
|||
/// informationoutside of the BuyModel, for example, the money amount from the player's inventory, then you need to either keep a
|
|||
/// reference to all the related models, or make this class an observer/event subscriber of the related models.
|
|||
/// </summary>
|
|||
public class ShopGridBuyView : MonoBehaviour |
|||
{ |
|||
public ShopModel ShopModel => shopModel; //A getter to access shopModel.
|
|||
|
|||
[SerializeField] |
|||
private GridLayoutGroup itemLayoutGroup; //Links to a GridLayoutGroup in the Unity scene
|
|||
|
|||
[SerializeField] |
|||
private GameObject itemPrefab; //A prefab to display an item in the view
|
|||
|
|||
[SerializeField] |
|||
private Button buyButton; |
|||
|
|||
[SerializeField] |
|||
private TextMeshProUGUI instructionText; |
|||
|
|||
private ViewConfig viewConfig; //To set up the grid view, we need to know how many columns the grid view has, in the current setup,
|
|||
//this information can be found in a ViewConfig scriptable object, which serves as a configuration file for
|
|||
//views.
|
|||
|
|||
private ShopModel shopModel; //Model in MVC pattern
|
|||
private ShopController shopController; //Controller in MVC pattern
|
|||
|
|||
private void Start() |
|||
{ |
|||
shopModel = new BuyModel(2f, 16, 500); //Right now use magic values to set up the shop
|
|||
shopController = gameObject.AddComponent<MouseController>().Initialize(shopModel);//Set the default controller to be the mouse controller
|
|||
viewConfig = Resources.Load<ViewConfig>("ViewConfig");//Load the ViewConfig scriptable object from the Resources folder
|
|||
Debug.Assert(viewConfig != null); |
|||
SetupItemIconView(); //Setup the grid view's properties
|
|||
PopulateItemIconView(); //Display items
|
|||
InitializeButtons(); //Connect the buttons to the controller
|
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// SetupItemIconView()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Setup the grid view according to the ViewConfig object's requirements, right now it just sets the constraint mode and column count,
|
|||
//you can make cosmetic adjustments to the GridLayoutGroup by adding more configurations to ViewConfig and use them adjusting properties
|
|||
//like cellSize, spacing, padding, etc.
|
|||
private void SetupItemIconView() |
|||
{ |
|||
itemLayoutGroup.constraint = GridLayoutGroup.Constraint.FixedColumnCount;//Set the constraint mode of the GridLayoutGroup
|
|||
itemLayoutGroup.constraintCount = viewConfig.gridViewColumnCount; //Set the column count according to the ViewConfig object
|
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// RepopulateItems()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Clears the grid view and repopulates it with new icons (updates the visible icons)
|
|||
private void RepopulateItemIconView() { |
|||
ClearIconView(); |
|||
PopulateItemIconView(); |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// PopulateItems()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Adds one icon for each item in the shop
|
|||
private void PopulateItemIconView() { |
|||
foreach (Item item in shopModel.inventory.GetItems()) { |
|||
AddItemToView(item); |
|||
} |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// ClearIconView()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Removes all existing icons in the gridview
|
|||
private void ClearIconView() { |
|||
Transform[] allIcons = itemLayoutGroup.transform.GetComponentsInChildren<Transform>(); |
|||
foreach (Transform child in allIcons) { |
|||
if (child != itemLayoutGroup.transform) { |
|||
Destroy(child.gameObject); |
|||
} |
|||
} |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// AddItemToView()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Adds a new item container to the view, each view can have its way of displaying items
|
|||
private void AddItemToView(Item item) { |
|||
GameObject newItemIcon = GameObject.Instantiate(itemPrefab); |
|||
newItemIcon.transform.SetParent(itemLayoutGroup.transform); |
|||
newItemIcon.transform.localScale = Vector3.one;//The scale would automatically change in Unity so we set it back to Vector3.one.
|
|||
|
|||
GridViewItemContainer itemContainer = newItemIcon.GetComponent<GridViewItemContainer>(); |
|||
Debug.Assert(itemContainer != null); |
|||
bool isSelected = (item == shopModel.GetSelectedItem()); |
|||
itemContainer.Initialize(item, isSelected); |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// InitializeButtons()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//This method adds a listener to the 'Buy' button. They are forwarded to the controller. Since this is the confirm button of
|
|||
//the buy view, it will just call the controller interface's ConfirmSelectedItem function, the controller will handle the rest.
|
|||
private void InitializeButtons() { |
|||
buyButton.onClick.AddListener( |
|||
delegate { |
|||
shopController.ConfirmSelectedItem(); |
|||
} |
|||
); |
|||
} |
|||
|
|||
private void Update() |
|||
{ |
|||
RepopulateItemIconView();//Repopulate the view each frame, this is very inefficient and won't work in many scenarios and SHOULD NOT be in
|
|||
//the final implementation, the view should be modified by the models via an observer or event queue pattern
|
|||
|
|||
//Switch between mouse and keyboard controllers
|
|||
if (Input.GetKeyUp(KeyCode.K)) |
|||
{ |
|||
if (shopController is MouseController) |
|||
{ |
|||
SwitchToKeyboardControl(); |
|||
} |
|||
} |
|||
|
|||
else if (Input.GetMouseButtonUp(0)) |
|||
{ |
|||
if (shopController is GridViewKeyboardController) |
|||
{ |
|||
SwitchToMouseControl(); |
|||
} |
|||
} |
|||
|
|||
//Let the current controller handle input
|
|||
shopController.HandleInput(); |
|||
} |
|||
|
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// SwitchToKeyboardControl()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
private void SwitchToKeyboardControl() |
|||
{ |
|||
Destroy(shopController);//Remove the current controller component
|
|||
shopController = gameObject.AddComponent<GridViewKeyboardController>().Initialize(shopModel);//Create and add a keyboard controller
|
|||
instructionText.text = "The current control mode is: Keyboard Control, WASD to select item, press K to buy. Press left mouse button to switch to Mouse Control."; |
|||
buyButton.gameObject.SetActive(false);//Hide the buy button because we only use keyboard
|
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// SwitchToMouseControl()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
private void SwitchToMouseControl() |
|||
{ |
|||
Destroy(shopController);//Remove the current controller component
|
|||
shopController = gameObject.AddComponent<MouseController>().Initialize(shopModel);//Create and add a mouse controller
|
|||
instructionText.text = "The current control mode is: Mouse Control, press 'K' to switch to Keyboard Control."; |
|||
buyButton.gameObject.SetActive(true);//Show the buy button for the mouse controler
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 05d65cdeb195c46ea856aabb07167f57 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,162 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using System.Drawing; |
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
using TMPro; |
|||
|
|||
/// <summary>
|
|||
/// This class connects a grid view for buy state of the shop to a controller to manipulate the BuyModel via a ShopController
|
|||
/// interface, it contains specific methods to setup and update a grid view, with the data from a BuyModel. If you want to display
|
|||
/// informationoutside of the BuyModel, for example, the money amount from the player's inventory, then you need to either keep a
|
|||
/// reference to all the related models, or make this class an observer/event subscriber of the related models.
|
|||
/// </summary>
|
|||
public abstract class ShopView : MonoBehaviour, IShopModelObserver<Item> |
|||
{ |
|||
public ShopModel ShopModel => model; //A getter to access shopModel.
|
|||
|
|||
[SerializeField] |
|||
protected GameObject itemPrefab; //A prefab to display an item in the view
|
|||
|
|||
[SerializeField] |
|||
protected Button buyButton; |
|||
|
|||
[SerializeField] |
|||
protected TextMeshProUGUI instructionText; |
|||
|
|||
[SerializeField] protected LayoutGroup layoutGroup; // The layout group that represents this view visually
|
|||
|
|||
protected ShopModel model; // Model in MVC pattern
|
|||
protected ShopModel other; // Other model in MVC pattern (our own inventory)
|
|||
private ShopController shopController; //Controller in MVC pattern
|
|||
|
|||
protected virtual void Start() |
|||
{ |
|||
model = new BuyModel(2f, 16, 500); //Right now use magic values to set up the shop
|
|||
shopController = gameObject.AddComponent<MouseController>().Initialize(model);//Set the default controller to be the mouse controller
|
|||
SetupItemIconView(); //Setup the grid view's properties
|
|||
PopulateItemIconView(); //Display items
|
|||
InitializeButtons(); //Connect the buttons to the controller
|
|||
//model.Subscribe(this);
|
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// SetupItemIconView()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Setup the grid view according to the ViewConfig object's requirements, right now it just sets the constraint mode and column count,
|
|||
//you can make cosmetic adjustments to the GridLayoutGroup by adding more configurations to ViewConfig and use them adjusting properties
|
|||
//like cellSize, spacing, padding, etc.
|
|||
protected abstract void SetupItemIconView(); |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// RepopulateItems()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Clears the grid view and repopulates it with new icons (updates the visible icons)
|
|||
private void RepopulateItemIconView() { |
|||
ClearIconView(); |
|||
PopulateItemIconView(); |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// PopulateItems()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Adds one icon for each item in the shop
|
|||
private void PopulateItemIconView() { |
|||
foreach (Item item in model.inventory.GetItems()) { |
|||
AddItemToView(item); |
|||
} |
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// ClearIconView()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Removes all existing icons in the gridview
|
|||
protected abstract void ClearIconView(); |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// AddItemToView()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//Adds a new item container to the view, each view can have its way of displaying items
|
|||
protected abstract void AddItemToView(Item item); |
|||
|
|||
protected abstract void RemoveItemFromView(Item item); |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// InitializeButtons()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
//This method adds a listener to the 'Buy' button. They are forwarded to the controller. Since this is the confirm button of
|
|||
//the buy view, it will just call the controller interface's ConfirmSelectedItem function, the controller will handle the rest.
|
|||
private void InitializeButtons() { |
|||
buyButton.onClick.AddListener( |
|||
delegate { |
|||
shopController.ConfirmSelectedItem(); |
|||
} |
|||
); |
|||
} |
|||
|
|||
private void Update() |
|||
{ |
|||
//RepopulateItemIconView();//Repopulate the view each frame, this is very inefficient and won't work in many scenarios and SHOULD NOT be in
|
|||
//the final implementation, the view should be modified by the models via an observer or event queue pattern
|
|||
|
|||
//Switch between mouse and keyboard controllers
|
|||
if (Input.GetKeyUp(KeyCode.K)) |
|||
{ |
|||
if (shopController is MouseController) |
|||
{ |
|||
SwitchToKeyboardControl(); |
|||
} |
|||
} |
|||
|
|||
else if (Input.GetMouseButtonUp(0)) |
|||
{ |
|||
if (shopController is GridViewKeyboardController) |
|||
{ |
|||
SwitchToMouseControl(); |
|||
} |
|||
} |
|||
|
|||
//Let the current controller handle input
|
|||
shopController.HandleInput(); |
|||
} |
|||
|
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// SwitchToKeyboardControl()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
private void SwitchToKeyboardControl() |
|||
{ |
|||
Destroy(shopController);//Remove the current controller component
|
|||
shopController = gameObject.AddComponent<GridViewKeyboardController>().Initialize(model);//Create and add a keyboard controller
|
|||
instructionText.text = "The current control mode is: Keyboard Control, WASD to select item, press K to buy. Press left mouse button to switch to Mouse Control."; |
|||
buyButton.gameObject.SetActive(false);//Hide the buy button because we only use keyboard
|
|||
} |
|||
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// SwitchToMouseControl()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
private void SwitchToMouseControl() |
|||
{ |
|||
Destroy(shopController);//Remove the current controller component
|
|||
shopController = gameObject.AddComponent<MouseController>().Initialize(model);//Create and add a mouse controller
|
|||
instructionText.text = "The current control mode is: Mouse Control, press 'K' to switch to Keyboard Control."; |
|||
buyButton.gameObject.SetActive(true);//Show the buy button for the mouse controler
|
|||
} |
|||
|
|||
public void OnSelected(Item item) |
|||
{ |
|||
Debug.Log("View selects item: " + item.name,this); |
|||
RepopulateItemIconView(); |
|||
} |
|||
|
|||
public void OnRemoved(Item item) |
|||
{ |
|||
RemoveItemFromView(item); |
|||
} |
|||
|
|||
public void OnAdded(Item item) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 3e0c2169685d5ff4493164d48847da4c |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,78 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using System.Security.Permissions; |
|||
using UnityEngine; |
|||
using UnityEngine.Assertions; |
|||
using UnityEngine.UI; |
|||
|
|||
public class ShopViewGrid : ShopView |
|||
{ |
|||
private GridLayoutGroup _gridLayoutGroup; // This is essentially just a reference to ShopView's layout group but with the correct type
|
|||
|
|||
protected ViewConfig viewConfig; //To set up the grid view, we need to know how many columns the grid view has, in the current setup,
|
|||
//this information can be found in a ViewConfig scriptable object, which serves as a configuration file for
|
|||
//views.
|
|||
|
|||
// Start is called before the first frame update
|
|||
protected override void Start() |
|||
{ |
|||
viewConfig = Resources.Load<ViewConfig>("ViewConfig");//Load the ViewConfig scriptable object from the Resources folder
|
|||
Debug.Assert(viewConfig != null); |
|||
Debug.Assert(_gridLayoutGroup != null); |
|||
base.Start(); |
|||
print("ShopView Grid Initialised"); |
|||
} |
|||
|
|||
protected override void SetupItemIconView() |
|||
{ |
|||
_gridLayoutGroup.constraint = GridLayoutGroup.Constraint.FixedColumnCount;//Set the constraint mode of the GridLayoutGroup
|
|||
_gridLayoutGroup.constraintCount = viewConfig.gridViewColumnCount; //Set the column count according to the ViewConfig object
|
|||
} |
|||
|
|||
protected override void ClearIconView() |
|||
{ |
|||
Transform[] allIcons = layoutGroup.transform.GetComponentsInChildren<Transform>(); |
|||
foreach (Transform child in allIcons) { |
|||
if (child != layoutGroup.transform) { |
|||
Destroy(child.gameObject); |
|||
} |
|||
} |
|||
} |
|||
|
|||
protected override void AddItemToView(Item item) |
|||
{ |
|||
GameObject newItemIcon = GameObject.Instantiate(itemPrefab); |
|||
newItemIcon.transform.SetParent(layoutGroup.transform); |
|||
newItemIcon.transform.localScale = Vector3.one;//The scale would automatically change in Unity so we set it back to Vector3.one.
|
|||
|
|||
ViewItemContainer itemContainer = newItemIcon.GetComponent<ViewItemContainer>(); |
|||
Debug.Assert(itemContainer != null); |
|||
//bool isSelected = (item == model.GetSelectedItem());
|
|||
var unsub = model.RegisterObserver(itemContainer); |
|||
itemContainer.Initialize(item,unsub); |
|||
print("Attempt to add item " + item.name + " to view"); |
|||
} |
|||
|
|||
protected override void RemoveItemFromView(Item item) |
|||
{ |
|||
var items = layoutGroup.transform.GetComponentsInChildren<ViewItemContainer>(); |
|||
foreach (var itemView in items) |
|||
{ |
|||
if (itemView.Item == item) |
|||
{ |
|||
model.RemoveObserver(itemView); |
|||
Destroy(itemView.gameObject); |
|||
return; |
|||
} |
|||
} |
|||
} |
|||
|
|||
private void OnValidate() |
|||
{ |
|||
_gridLayoutGroup = (GridLayoutGroup) layoutGroup; |
|||
bool correctLayout = _gridLayoutGroup != null; |
|||
if(!correctLayout) Debug.LogError("Layout group is not of type Grid!",this); |
|||
//else Debug.Log("Grid shop view validated",this);
|
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: efb84f97477b1db43871b69a638f1ac2 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,84 @@ |
|||
using System; |
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using Unity.Collections.LowLevel.Unsafe; |
|||
using UnityEngine; |
|||
using UnityEngine.UI; |
|||
using UnityEngine.U2D; |
|||
|
|||
/// <summary>
|
|||
/// This class is applied to a button that represents an Item in the View. It is a visual representation of the item
|
|||
/// when it is visible in the store. The class holds a link to the original Item, it sets the icon of the button to
|
|||
/// the one specified in the Item data, and it enables or disables the infoPanel to indicate if the item is selected
|
|||
/// and display the details of the item. The original implementation was hardcoded for the grid view. We use patterns to
|
|||
/// make this one a little more universally useful
|
|||
/// </summary>
|
|||
public class ViewItemContainer : MonoBehaviour, IItemContainer, IShopModelObserver<Item> |
|||
{ |
|||
public Item Item => item;//Public getter for the item, required by IItemContainer interface.
|
|||
// IItemContainer interface requires to know whether an item is selected visually or not. This implementation determines that by checking the info panel
|
|||
public bool IsSelected { |
|||
get { return infoPanel.gameObject.activeSelf; } |
|||
set { infoPanel.SetActive(value); highLight.SetActive(value);} |
|||
} |
|||
|
|||
|
|||
//Link to the highlight image (set in prefab)
|
|||
[SerializeField] |
|||
private GameObject highLight; |
|||
|
|||
//Link to the infomation panel (set in prefab), prototype pattern
|
|||
[SerializeField] |
|||
private GameObject infoPanel; |
|||
|
|||
[SerializeField] |
|||
private Image icon; |
|||
|
|||
//Link to the atlas of all the item icons, use to retrieve sprites for items. For more information of the API check:
|
|||
// https://docs.unity3d.com/2019.3/Documentation/Manual/class-SpriteAtlas.html
|
|||
[SerializeField] |
|||
private SpriteAtlas iconAtlas; |
|||
|
|||
//link to the original item (set in Initialize)
|
|||
private Item item; |
|||
|
|||
private IDisposable _unsubscriber; // If this item manages its own lifetime, this will not be null
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
// Initialize()
|
|||
//------------------------------------------------------------------------------------------------------------------------
|
|||
public void Initialize(Item item, IDisposable unsubscriber = null){ // pass unsubscriber to this object to make it manage its own lifetime
|
|||
//Stores the item
|
|||
this.item = item; |
|||
|
|||
//Sets the highlight image and infoPanel's visibility
|
|||
//if (isSelected) {
|
|||
// highLight.SetActive(true);
|
|||
// infoPanel.SetActive(true);
|
|||
//}
|
|||
|
|||
// Clones the first Sprite in the icon atlas that matches the iconName and uses it as the sprite of the icon image.
|
|||
Sprite sprite = iconAtlas.GetSprite(item.iconName); |
|||
|
|||
if (sprite != null) { |
|||
icon.sprite = sprite; |
|||
} |
|||
} |
|||
|
|||
// When the observable fires, check if we're the view corresponding to the selected item. Select if we are!
|
|||
public void OnSelected(Item item) |
|||
{ |
|||
IsSelected = this.item == item; |
|||
} |
|||
|
|||
public void OnRemoved(Item item) |
|||
{ |
|||
if (item != Item) return; // Well we only want this if the item removed from the model is actually ours!
|
|||
_unsubscriber?.Dispose(); // Careful! If we don't make this thing aware that it manages itself, and we forget to manage it, we have a memory leak
|
|||
Destroy(gameObject); |
|||
} |
|||
|
|||
public void OnAdded(Item item) |
|||
{ |
|||
throw new NotImplementedException(); |
|||
} |
|||
} |
|||
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 04d5ea5fa6876284fb8c44e4316a34ca |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 9c6bf6c496445427ca22a18ca7c05c01 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
|
After Width: | Height: | Size: 112 KiB |
File diff suppressed because it is too large
@ -0,0 +1,725 @@ |
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!687078895 &4343727234628468602 |
|||
SpriteAtlas: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: ItemsAtlas |
|||
m_EditorData: |
|||
serializedVersion: 2 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
anisoLevel: 1 |
|||
compressionQuality: 50 |
|||
maxTextureSize: 2048 |
|||
textureCompression: 0 |
|||
filterMode: 1 |
|||
generateMipMaps: 0 |
|||
readable: 0 |
|||
crunchedCompression: 0 |
|||
sRGB: 1 |
|||
platformSettings: |
|||
- serializedVersion: 3 |
|||
m_BuildTarget: DefaultTexturePlatform |
|||
m_MaxTextureSize: 1024 |
|||
m_ResizeAlgorithm: 0 |
|||
m_TextureFormat: -1 |
|||
m_TextureCompression: 1 |
|||
m_CompressionQuality: 50 |
|||
m_CrunchedCompression: 0 |
|||
m_AllowsAlphaSplitting: 0 |
|||
m_Overridden: 0 |
|||
m_AndroidETC2FallbackOverride: 0 |
|||
m_ForceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
packingSettings: |
|||
serializedVersion: 2 |
|||
padding: 4 |
|||
blockOffset: 1 |
|||
allowAlphaSplitting: 0 |
|||
enableRotation: 1 |
|||
enableTightPacking: 1 |
|||
variantMultiplier: 1 |
|||
packables: |
|||
- {fileID: 2800000, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
bindAsDefault: 1 |
|||
m_MasterAtlas: {fileID: 0} |
|||
m_PackedSprites: |
|||
- {fileID: 1651301721702839308, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4807555653334919161, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8344717679193547042, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3718929783938772351, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2703565723401933593, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5755098471613179246, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7885408681318359695, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3099794969598387302, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 117214147892069551, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1754823780530430466, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8561368130231944860, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7463198533326207501, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2163354836892620996, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 9184157982723834790, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2968194082416969238, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3471105485034724482, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4754669527154036151, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7852314945348522046, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1042470306147753749, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5487276986869650839, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2708232225190019670, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6203400943613683936, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8297024878129875434, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1881094940640685950, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 433385668791466282, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -283928834605712996, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5456021369733951222, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7977443681283346765, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1355992391739867059, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6884638544535043099, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5219045542264890561, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3435460411082399992, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7223933354684737430, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5837177561311991975, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5413622142816706186, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6512645012001003500, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5252835699789497765, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1908792099320402436, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8275251718437484499, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4266140228096889736, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1460074766799940719, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4161015639148759634, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7970607787205733082, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5240553382513454499, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4146478380861144844, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8132739989941244476, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2490575410972222643, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8615779234747623787, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5028253573829169951, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6761164967045977113, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5508725064705088119, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -68751727340038015, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6099581493293703690, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5428206428529569624, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7833671090200325546, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -445417244362737262, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5860025163644826426, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4643893731308716684, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7583409310137716746, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5835186049351072662, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3882832789022649457, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 980155311395259703, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -450361279472710352, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8878694685562031488, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -732356172534689064, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6136987273679336495, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 95058772833327676, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -956252262595852801, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1256422677136633768, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6770572910690203029, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5579238883901062570, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2693009140137883590, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4424744207402746503, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -498969519454911232, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2429457697700603145, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2614870373251885436, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3447626333678633045, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8300092254350328241, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7711394430603173151, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3209429344413848919, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8132948862792318974, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1784186740104572286, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4063295180217184869, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2392559344560956286, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1004743792253187300, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2977179857457164796, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4538752222985096420, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8391431092616798930, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4078589816385665303, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 9217149113939606522, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2587855155107634561, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7874393127953130763, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6395214293025444372, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6355480216337973169, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7651958066320933242, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5362799649635832982, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3801417226305609865, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6338023803479276477, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -9098891631924085042, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 124106431076995637, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7116206395379427616, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -220729229975464070, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6948206339139857546, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6738218706411903907, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8436657204533251546, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5947598201806246533, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7655823996655903715, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3212368913584548517, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 9056630653348509452, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5714958088803451091, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6191716412420617325, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6229739577819397656, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2634581254100188468, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7734322209070720544, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7911235102323647998, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2140243605101427217, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1122774824596591943, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4058434812019303673, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8864223617709786134, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4533227004153260592, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -975732921841048486, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6657913739729259365, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 552989659857323890, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7035944541455254544, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1764615673616170435, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7162647019817104946, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 206911327383899660, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4292883687895924744, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3656430840982619259, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7306274148607722714, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5939302461621596088, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1704500264438275045, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3930946897451993484, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3711129781536342010, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 9216205297631055959, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8295029410813222302, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5484207526445910981, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5846979971430347887, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 880747531601085966, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8742299254280240975, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6077338267653451029, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8561806557982860685, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4016013334462737405, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6620927211670007745, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1359165526104252653, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7903874054988691285, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3551775415495820340, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1389849888674057003, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7121528990389113491, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6102374392529501751, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7479063964076681684, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 171138705577659461, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 9148803566423877661, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6068373614614089934, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -303773854570714582, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2008970548212793266, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1419688920513946626, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2586642229955333766, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5996106085844551684, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3450007023295956540, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1533569245288039128, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3386722485073375770, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5626462023738469512, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1378875455734331773, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2530256077145114623, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 9130684549513820550, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8450120992082419419, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1089564401988209714, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2108055075359774045, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6064055205779420750, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8089074258220290989, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5820086750453969133, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7697943422035235417, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6374625040168284442, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4278747916818796210, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3514555725737318775, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3978551154961114089, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4790045407390419966, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7449126770283777516, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 9074706117657797723, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -191080983239036974, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7062176475876359583, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6720243606718852342, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6988130921096395802, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4033428354454998030, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4939730339798417211, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3845479819248093833, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8124165405611791505, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1039740323736012158, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -914228068540843439, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 497271462812818090, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2834859317503590577, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5244515616369616431, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8086557183682922639, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1929863458776020100, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2992740897147028129, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1067920246338498130, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6759244946866839360, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -649829298453278362, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8726926368370625433, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8594149717606132895, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5337744933849262730, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3083499485765743726, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1712464291680838311, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4550341189887911203, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3226743548265507589, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5539077537493426, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8286571802576935001, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5269696323455554877, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8290611470655891339, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6188957306453505083, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6082515373609937419, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5147371820058082055, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5445964894364698891, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3725660825845489998, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -773804254923871252, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8679271814344934513, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 286146971249415325, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2912073609765926196, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6270936594076553448, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2168385262913792458, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4367303311738571903, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1151996310349085916, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8093776482942797998, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2924082833364022499, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5531112312634962606, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7419183496887217242, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7052581004101995152, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8516917602417747853, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6081911586937866497, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7922772116564282560, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4166367481640030672, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3202399762542200801, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5098798191685754696, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 656702045158751335, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1532973433821848267, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4598683759588099128, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1641972083343085278, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2239089160402629893, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8386005727647381285, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -845648291306456796, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4086494821270395366, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2761496282796171072, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8063166274908954825, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6556086720143981034, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 9216477913858037417, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6756539409642309872, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5863121150902147412, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6214652250989123760, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2671944909483971029, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1629762946634793544, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7898442284587706422, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1060939947970621808, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5344007660830287148, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3023603986270384678, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 683541644967008519, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6042045879560887766, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -980805612476868376, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1742012962666287389, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5751055401038393160, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8402414406139069270, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1212122603823474919, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4269181389663735365, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5044350967181698012, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2452643651453336816, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1906296669749205340, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7381558169326551693, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8767210940616089323, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6260659127007101507, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7296131321258663700, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8862701587616323045, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5378297296127734944, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8999859454926596933, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5492500456884366514, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 1797115407225013134, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2839628685392012766, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8033723429876189661, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8195587494142681365, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3459497016148413627, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7109519275558264549, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8179438966543336367, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -847223144147799035, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8700196332464470029, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6314550479633173585, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3056869423434569188, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -854671996359030078, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7363307940098025192, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8339134907207802950, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -851246318378289833, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8297164604188563192, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4249666258807903423, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8120240302564751247, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7652257075970667830, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1189029685597959389, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2892722968376938932, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8069547862873273568, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7868066966165509634, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6171598609181438139, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6524714282782223981, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -741101566140153539, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4502050031476377117, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7072109450132228763, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5116142596969959981, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3169434119103337190, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8966515893708187581, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6908069387385937300, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6958571527567373106, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2936779923054452310, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6852758633542660841, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 5303467171633259579, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4850781349598404350, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3864835576925441180, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7605754988663979374, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -3753784414763703992, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4814700136793304682, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -4055912437774249039, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8046720434674076825, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 3158488010477605343, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -1083111729585998019, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8574266010513421610, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 7409123981252767002, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8646935460526470913, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2291968272303781032, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 6234064350648681191, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 233620996897989955, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -5703758344047898144, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 8201081582909886744, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8029774753496570066, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 4775838593620856055, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7905648789407400134, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -6555833754187840093, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: 2316303970329030911, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2660569609710428876, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -2580360775680210046, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -7323674943459820596, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -8650232248937032532, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
- {fileID: -9130817090286624542, guid: b00993d063fbc4a87983115070f6145c, type: 3} |
|||
m_PackedSpriteNamesToIndex: |
|||
- items_101 |
|||
- items_179 |
|||
- items_100 |
|||
- items_103 |
|||
- items_118 |
|||
- items_102 |
|||
- items_174 |
|||
- items_198 |
|||
- items_119 |
|||
- items_105 |
|||
- items_175 |
|||
- items_169 |
|||
- items_199 |
|||
- items_104 |
|||
- items_176 |
|||
- items_168 |
|||
- items_196 |
|||
- items_107 |
|||
- items_177 |
|||
- items_167 |
|||
- items_197 |
|||
- items_106 |
|||
- items_170 |
|||
- items_166 |
|||
- items_194 |
|||
- items_171 |
|||
- items_165 |
|||
- items_195 |
|||
- items_172 |
|||
- items_164 |
|||
- items_192 |
|||
- items_173 |
|||
- items_163 |
|||
- items_193 |
|||
- items_162 |
|||
- items_190 |
|||
- items_161 |
|||
- items_191 |
|||
- items_160 |
|||
- items_321 |
|||
- items_320 |
|||
- items_323 |
|||
- items_322 |
|||
- items_325 |
|||
- items_324 |
|||
- items_327 |
|||
- items_326 |
|||
- items_329 |
|||
- items_328 |
|||
- items_0 |
|||
- items_1 |
|||
- items_2 |
|||
- items_3 |
|||
- items_4 |
|||
- items_5 |
|||
- items_260 |
|||
- items_6 |
|||
- items_261 |
|||
- items_7 |
|||
- items_262 |
|||
- items_202 |
|||
- items_8 |
|||
- items_263 |
|||
- items_203 |
|||
- items_9 |
|||
- items_264 |
|||
- items_200 |
|||
- items_13 |
|||
- items_265 |
|||
- items_201 |
|||
- items_215 |
|||
- items_12 |
|||
- items_266 |
|||
- items_206 |
|||
- items_214 |
|||
- items_11 |
|||
- items_75 |
|||
- items_267 |
|||
- items_207 |
|||
- items_217 |
|||
- items_10 |
|||
- items_26 |
|||
- items_74 |
|||
- items_268 |
|||
- items_204 |
|||
- items_216 |
|||
- items_17 |
|||
- items_27 |
|||
- items_77 |
|||
- items_269 |
|||
- items_205 |
|||
- items_211 |
|||
- items_16 |
|||
- items_24 |
|||
- items_76 |
|||
- items_88 |
|||
- items_210 |
|||
- items_15 |
|||
- items_25 |
|||
- items_39 |
|||
- items_71 |
|||
- items_89 |
|||
- items_213 |
|||
- items_14 |
|||
- items_22 |
|||
- items_38 |
|||
- items_70 |
|||
- items_208 |
|||
- items_212 |
|||
- items_288 |
|||
- items_23 |
|||
- items_73 |
|||
- items_209 |
|||
- items_289 |
|||
- items_20 |
|||
- items_72 |
|||
- items_19 |
|||
- items_21 |
|||
- items_99 |
|||
- items_18 |
|||
- items_98 |
|||
- items_219 |
|||
- items_80 |
|||
- items_218 |
|||
- items_282 |
|||
- items_31 |
|||
- items_79 |
|||
- items_81 |
|||
- items_283 |
|||
- items_30 |
|||
- items_78 |
|||
- items_82 |
|||
- items_130 |
|||
- items_280 |
|||
- items_33 |
|||
- items_83 |
|||
- items_93 |
|||
- items_131 |
|||
- items_239 |
|||
- items_281 |
|||
- items_28 |
|||
- items_32 |
|||
- items_84 |
|||
- items_92 |
|||
- items_132 |
|||
- items_152 |
|||
- items_238 |
|||
- items_286 |
|||
- items_29 |
|||
- items_35 |
|||
- items_85 |
|||
- items_91 |
|||
- items_133 |
|||
- items_123 |
|||
- items_153 |
|||
- items_237 |
|||
- items_287 |
|||
- items_34 |
|||
- items_86 |
|||
- items_90 |
|||
- items_134 |
|||
- items_122 |
|||
- items_150 |
|||
- items_236 |
|||
- items_284 |
|||
- items_37 |
|||
- items_87 |
|||
- items_97 |
|||
- items_135 |
|||
- items_121 |
|||
- items_151 |
|||
- items_145 |
|||
- items_235 |
|||
- items_285 |
|||
- items_36 |
|||
- items_96 |
|||
- items_136 |
|||
- items_120 |
|||
- items_156 |
|||
- items_144 |
|||
- items_234 |
|||
- items_95 |
|||
- items_137 |
|||
- items_127 |
|||
- items_157 |
|||
- items_147 |
|||
- items_233 |
|||
- items_94 |
|||
- items_138 |
|||
- items_126 |
|||
- items_154 |
|||
- items_146 |
|||
- items_232 |
|||
- items_139 |
|||
- items_125 |
|||
- items_155 |
|||
- items_141 |
|||
- items_231 |
|||
- items_124 |
|||
- items_140 |
|||
- items_230 |
|||
- items_143 |
|||
- items_158 |
|||
- items_142 |
|||
- items_129 |
|||
- items_159 |
|||
- items_128 |
|||
- items_149 |
|||
- items_148 |
|||
- items_318 |
|||
- items_319 |
|||
- items_309 |
|||
- items_308 |
|||
- items_310 |
|||
- items_311 |
|||
- items_312 |
|||
- items_313 |
|||
- items_303 |
|||
- items_314 |
|||
- items_302 |
|||
- items_315 |
|||
- items_301 |
|||
- items_316 |
|||
- items_300 |
|||
- items_336 |
|||
- items_273 |
|||
- items_62 |
|||
- items_317 |
|||
- items_307 |
|||
- items_272 |
|||
- items_63 |
|||
- items_306 |
|||
- items_334 |
|||
- items_271 |
|||
- items_60 |
|||
- items_305 |
|||
- items_335 |
|||
- items_270 |
|||
- items_246 |
|||
- items_61 |
|||
- items_304 |
|||
- items_332 |
|||
- items_277 |
|||
- items_247 |
|||
- items_66 |
|||
- items_333 |
|||
- items_276 |
|||
- items_244 |
|||
- items_67 |
|||
- items_330 |
|||
- items_275 |
|||
- items_245 |
|||
- items_259 |
|||
- items_64 |
|||
- items_331 |
|||
- items_274 |
|||
- items_242 |
|||
- items_258 |
|||
- items_65 |
|||
- items_243 |
|||
- items_240 |
|||
- items_279 |
|||
- items_241 |
|||
- items_68 |
|||
- items_278 |
|||
- items_69 |
|||
- items_228 |
|||
- items_251 |
|||
- items_229 |
|||
- items_299 |
|||
- items_48 |
|||
- items_250 |
|||
- items_298 |
|||
- items_49 |
|||
- items_253 |
|||
- items_248 |
|||
- items_252 |
|||
- items_224 |
|||
- items_181 |
|||
- items_249 |
|||
- items_255 |
|||
- items_225 |
|||
- items_295 |
|||
- items_44 |
|||
- items_180 |
|||
- items_254 |
|||
- items_226 |
|||
- items_294 |
|||
- items_45 |
|||
- items_59 |
|||
- items_183 |
|||
- items_257 |
|||
- items_227 |
|||
- items_297 |
|||
- items_46 |
|||
- items_58 |
|||
- items_182 |
|||
- items_256 |
|||
- items_220 |
|||
- items_296 |
|||
- items_47 |
|||
- items_57 |
|||
- items_185 |
|||
- items_221 |
|||
- items_291 |
|||
- items_40 |
|||
- items_56 |
|||
- items_116 |
|||
- items_184 |
|||
- items_222 |
|||
- items_290 |
|||
- items_41 |
|||
- items_55 |
|||
- items_117 |
|||
- items_187 |
|||
- items_223 |
|||
- items_293 |
|||
- items_42 |
|||
- items_54 |
|||
- items_114 |
|||
- items_186 |
|||
- items_292 |
|||
- items_43 |
|||
- items_53 |
|||
- items_115 |
|||
- items_109 |
|||
- items_189 |
|||
- items_52 |
|||
- items_112 |
|||
- items_108 |
|||
- items_188 |
|||
- items_51 |
|||
- items_113 |
|||
- items_50 |
|||
- items_110 |
|||
- items_111 |
|||
- items_178 |
|||
m_Tag: ItemsAtlas |
|||
m_IsVariant: 0 |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 61885a51c5dad46cd8f257139ddcc43a |
|||
NativeFormatImporter: |
|||
externalObjects: {} |
|||
mainObjectFileID: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
|
After Width: | Height: | Size: 411 B |
@ -0,0 +1,92 @@ |
|||
fileFormatVersion: 2 |
|||
guid: dd0dcaff3fbc540a5939f38c384fa68a |
|||
TextureImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 11 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 0 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -100 |
|||
wrapU: 1 |
|||
wrapV: 1 |
|||
wrapW: 1 |
|||
nPOTScale: 0 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 1 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 1 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 8 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
applyGammaDecoding: 0 |
|||
platformSettings: |
|||
- serializedVersion: 3 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: 5e97eb03825dee720800000000000000 |
|||
internalID: 0 |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
secondaryTextures: [] |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
|
After Width: | Height: | Size: 413 B |
@ -0,0 +1,92 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 62fd45f94ff6640bea3809c0b7b96113 |
|||
TextureImporter: |
|||
internalIDToNameTable: [] |
|||
externalObjects: {} |
|||
serializedVersion: 11 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 0 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
streamingMipmaps: 0 |
|||
streamingMipmapsPriority: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -100 |
|||
wrapU: 1 |
|||
wrapV: 1 |
|||
wrapW: 1 |
|||
nPOTScale: 0 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 1 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spritePixelsToUnits: 100 |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spriteGenerateFallbackPhysicsShape: 1 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 1 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 8 |
|||
textureShape: 1 |
|||
singleChannelComponent: 0 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
applyGammaDecoding: 0 |
|||
platformSettings: |
|||
- serializedVersion: 3 |
|||
buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 0 |
|||
textureFormat: -1 |
|||
textureCompression: 1 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
androidETC2FallbackOverride: 0 |
|||
forceMaximumCompressionQuality_BC6H_BC7: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
bones: [] |
|||
spriteID: 5e97eb03825dee720800000000000000 |
|||
internalID: 0 |
|||
vertices: [] |
|||
indices: |
|||
edges: [] |
|||
weights: [] |
|||
secondaryTextures: [] |
|||
spritePackingTag: |
|||
pSDRemoveMatte: 0 |
|||
pSDShowRemoveMatteOption: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 44a20ce4afa9a4b118effe3cf8d47cf3 |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: f54d1bd14bd3ca042bd867b519fee8cc |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 6ab70aee4d56447429c680537fbf93ed |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,46 @@ |
|||
Digitized data copyright (c) 2010 Google Corporation |
|||
with Reserved Font Arimo, Tinos and Cousine. |
|||
Copyright (c) 2012 Red Hat, Inc. |
|||
with Reserved Font Name Liberation. |
|||
|
|||
This Font Software is licensed under the SIL Open Font License, Version 1.1. |
|||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL |
|||
|
|||
----------------------------------------------------------- |
|||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 |
|||
----------------------------------------------------------- |
|||
|
|||
PREAMBLE |
|||
The goals of the Open Font License (OFL) are to stimulate worldwide development of collaborative font projects, to support the font creation efforts of academic and linguistic communities, and to provide a free and open framework in which fonts may be shared and improved in partnership with others. |
|||
|
|||
The OFL allows the licensed fonts to be used, studied, modified and redistributed freely as long as they are not sold by themselves. The fonts, including any derivative works, can be bundled, embedded, redistributed and/or sold with any software provided that any reserved names are not used by derivative works. The fonts and derivatives, however, cannot be released under any other type of license. The requirement for fonts to remain under this license does not apply to any document created using the fonts or their derivatives. |
|||
|
|||
DEFINITIONS |
|||
"Font Software" refers to the set of files released by the Copyright Holder(s) under this license and clearly marked as such. This may include source files, build scripts and documentation. |
|||
|
|||
"Reserved Font Name" refers to any names specified as such after the copyright statement(s). |
|||
|
|||
"Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). |
|||
|
|||
"Modified Version" refers to any derivative made by adding to, deleting, or substituting -- in part or in whole -- any of the components of the Original Version, by changing formats or by porting the Font Software to a new environment. |
|||
|
|||
"Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. |
|||
|
|||
PERMISSION & CONDITIONS |
|||
Permission is hereby granted, free of charge, to any person obtaining a copy of the Font Software, to use, study, copy, merge, embed, modify, redistribute, and sell modified and unmodified copies of the Font Software, subject to the following conditions: |
|||
|
|||
1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. |
|||
|
|||
2) Original or Modified Versions of the Font Software may be bundled, redistributed and/or sold with any software, provided that each copy contains the above copyright notice and this license. These can be included either as stand-alone text files, human-readable headers or in the appropriate machine-readable metadata fields within text or binary files as long as those fields can be easily viewed by the user. |
|||
|
|||
3) No Modified Version of the Font Software may use the Reserved Font Name(s) unless explicit written permission is granted by the corresponding Copyright Holder. This restriction only applies to the primary font name as presented to the users. |
|||
|
|||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font Software shall not be used to promote, endorse or advertise any Modified Version, except to acknowledge the contribution(s) of the Copyright Holder(s) and the Author(s) or with their explicit written permission. |
|||
|
|||
5) The Font Software, modified or unmodified, in part or in whole, must be distributed entirely under this license, and must not be distributed under any other license. The requirement for fonts to remain under this license does not apply to any document created using the Font Software. |
|||
|
|||
TERMINATION |
|||
This license becomes null and void if any of the above conditions are not met. |
|||
|
|||
DISCLAIMER |
|||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 6e59c59b81ab47f9b6ec5781fa725d2c |
|||
timeCreated: 1484171296 |
|||
licenseType: Pro |
|||
TextScriptImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
Binary file not shown.
@ -0,0 +1,19 @@ |
|||
fileFormatVersion: 2 |
|||
guid: e3265ab4bf004d28a9537516768c1c75 |
|||
timeCreated: 1484171297 |
|||
licenseType: Pro |
|||
TrueTypeFontImporter: |
|||
serializedVersion: 2 |
|||
fontSize: 16 |
|||
forceTextureCase: -2 |
|||
characterSpacing: 1 |
|||
characterPadding: 0 |
|||
includeFontData: 1 |
|||
use2xBehaviour: 0 |
|||
fontNames: [] |
|||
fallbackFontReferences: [] |
|||
customCharacters: |
|||
fontRenderingMode: 0 |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 243e06394e614e5d99fab26083b707fa |
|||
folderAsset: yes |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,9 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 731f1baa9d144a9897cb1d341c2092b8 |
|||
folderAsset: yes |
|||
timeCreated: 1442040525 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,106 @@ |
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: LiberationSans SDF - Drop Shadow |
|||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} |
|||
m_ShaderKeywords: OUTLINE_ON UNDERLAY_ON |
|||
m_LightmapFlags: 5 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _Cube: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _FaceTex: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _MainTex: |
|||
m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, |
|||
type: 2} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _OutlineTex: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
m_Floats: |
|||
- _Ambient: 0.5 |
|||
- _Bevel: 0.5 |
|||
- _BevelClamp: 0 |
|||
- _BevelOffset: 0 |
|||
- _BevelRoundness: 0 |
|||
- _BevelWidth: 0 |
|||
- _BumpFace: 0 |
|||
- _BumpOutline: 0 |
|||
- _ColorMask: 15 |
|||
- _Diffuse: 0.5 |
|||
- _DiffusePower: 1 |
|||
- _FaceDilate: 0.1 |
|||
- _FaceUVSpeedX: 0 |
|||
- _FaceUVSpeedY: 0 |
|||
- _GlowInner: 0.05 |
|||
- _GlowOffset: 0 |
|||
- _GlowOuter: 0.05 |
|||
- _GlowPower: 0.75 |
|||
- _GradientScale: 10 |
|||
- _LightAngle: 3.1416 |
|||
- _MaskSoftnessX: 0 |
|||
- _MaskSoftnessY: 0 |
|||
- _OutlineSoftness: 0 |
|||
- _OutlineUVSpeedX: 0 |
|||
- _OutlineUVSpeedY: 0 |
|||
- _OutlineWidth: 0.1 |
|||
- _PerspectiveFilter: 0.875 |
|||
- _Reflectivity: 10 |
|||
- _ScaleRatioA: 0.9 |
|||
- _ScaleRatioB: 0.73125 |
|||
- _ScaleRatioC: 0.64125 |
|||
- _ScaleX: 1 |
|||
- _ScaleY: 1 |
|||
- _ShaderFlags: 0 |
|||
- _Sharpness: 0 |
|||
- _SpecularPower: 2 |
|||
- _Stencil: 0 |
|||
- _StencilComp: 8 |
|||
- _StencilOp: 0 |
|||
- _StencilReadMask: 255 |
|||
- _StencilWriteMask: 255 |
|||
- _TextureHeight: 1024 |
|||
- _TextureWidth: 1024 |
|||
- _UnderlayDilate: 0 |
|||
- _UnderlayOffsetX: 0.5 |
|||
- _UnderlayOffsetY: -0.5 |
|||
- _UnderlaySoftness: 0.05 |
|||
- _VertexOffsetX: 0 |
|||
- _VertexOffsetY: 0 |
|||
- _WeightBold: 0.75 |
|||
- _WeightNormal: 0 |
|||
m_Colors: |
|||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} |
|||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1} |
|||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} |
|||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} |
|||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1} |
|||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: e73a58f6e2794ae7b1b7e50b7fb811b0 |
|||
timeCreated: 1484172806 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,337 @@ |
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2180264 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: LiberationSans SDF Material |
|||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} |
|||
m_ShaderKeywords: |
|||
m_LightmapFlags: 1 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _Cube: |
|||
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} |
|||
- _FaceTex: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _MainTex: |
|||
m_Texture: {fileID: 28268798066460806} |
|||
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} |
|||
- _OutlineTex: |
|||
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_Floats: |
|||
- _Ambient: 0.5 |
|||
- _Bevel: 0.5 |
|||
- _BevelClamp: 0 |
|||
- _BevelOffset: 0 |
|||
- _BevelRoundness: 0 |
|||
- _BevelWidth: 0 |
|||
- _BumpFace: 0 |
|||
- _BumpOutline: 0 |
|||
- _BumpScale: 1 |
|||
- _ColorMask: 15 |
|||
- _Cutoff: 0.5 |
|||
- _DetailNormalMapScale: 1 |
|||
- _Diffuse: 0.5 |
|||
- _DstBlend: 0 |
|||
- _FaceDilate: 0 |
|||
- _FaceUVSpeedX: 0 |
|||
- _FaceUVSpeedY: 0 |
|||
- _GlossMapScale: 1 |
|||
- _Glossiness: 0.5 |
|||
- _GlossyReflections: 1 |
|||
- _GlowInner: 0.05 |
|||
- _GlowOffset: 0 |
|||
- _GlowOuter: 0.05 |
|||
- _GlowPower: 0.75 |
|||
- _GradientScale: 10 |
|||
- _LightAngle: 3.1416 |
|||
- _MaskSoftnessX: 0 |
|||
- _MaskSoftnessY: 0 |
|||
- _Metallic: 0 |
|||
- _Mode: 0 |
|||
- _OcclusionStrength: 1 |
|||
- _OutlineSoftness: 0 |
|||
- _OutlineUVSpeedX: 0 |
|||
- _OutlineUVSpeedY: 0 |
|||
- _OutlineWidth: 0 |
|||
- _Parallax: 0.02 |
|||
- _PerspectiveFilter: 0.875 |
|||
- _Reflectivity: 10 |
|||
- _ScaleRatioA: 0.90909094 |
|||
- _ScaleRatioB: 0.73125 |
|||
- _ScaleRatioC: 0.7386364 |
|||
- _ScaleX: 1 |
|||
- _ScaleY: 1 |
|||
- _ShaderFlags: 0 |
|||
- _Sharpness: 0 |
|||
- _SmoothnessTextureChannel: 0 |
|||
- _SpecularHighlights: 1 |
|||
- _SpecularPower: 2 |
|||
- _SrcBlend: 1 |
|||
- _Stencil: 0 |
|||
- _StencilComp: 8 |
|||
- _StencilOp: 0 |
|||
- _StencilReadMask: 255 |
|||
- _StencilWriteMask: 255 |
|||
- _TextureHeight: 512 |
|||
- _TextureWidth: 512 |
|||
- _UVSec: 0 |
|||
- _UnderlayDilate: 0 |
|||
- _UnderlayOffsetX: 0 |
|||
- _UnderlayOffsetY: 0 |
|||
- _UnderlaySoftness: 0 |
|||
- _VertexOffsetX: 0 |
|||
- _VertexOffsetY: 0 |
|||
- _WeightBold: 0.75 |
|||
- _WeightNormal: 0 |
|||
- _ZWrite: 1 |
|||
m_Colors: |
|||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} |
|||
- _Color: {r: 1, g: 1, b: 1, a: 1} |
|||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} |
|||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1} |
|||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} |
|||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} |
|||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1} |
|||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} |
|||
--- !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: 71c1514a6bd24e1e882cebbe1904ce04, type: 3} |
|||
m_Name: LiberationSans SDF - Fallback |
|||
m_EditorClassIdentifier: |
|||
hashCode: -1699145518 |
|||
material: {fileID: 2180264} |
|||
materialHashCode: -1183942120 |
|||
m_Version: 1.1.0 |
|||
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75 |
|||
m_SourceFontFile_EditorRef: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, |
|||
type: 3} |
|||
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3} |
|||
m_AtlasPopulationMode: 1 |
|||
m_FaceInfo: |
|||
m_FamilyName: Liberation Sans |
|||
m_StyleName: Regular |
|||
m_PointSize: 86 |
|||
m_Scale: 1 |
|||
m_LineHeight: 98.8916 |
|||
m_AscentLine: 77.853516 |
|||
m_CapLine: 59 |
|||
m_MeanLine: 45 |
|||
m_Baseline: 0 |
|||
m_DescentLine: -18.22461 |
|||
m_SuperscriptOffset: 77.853516 |
|||
m_SuperscriptSize: 0.5 |
|||
m_SubscriptOffset: -18.22461 |
|||
m_SubscriptSize: 0.5 |
|||
m_UnderlineOffset: -12.261719 |
|||
m_UnderlineThickness: 6.298828 |
|||
m_StrikethroughOffset: 18 |
|||
m_StrikethroughThickness: 6.298828 |
|||
m_TabWidth: 24 |
|||
m_GlyphTable: [] |
|||
m_CharacterTable: [] |
|||
m_AtlasTextures: |
|||
- {fileID: 28268798066460806} |
|||
m_AtlasTextureIndex: 0 |
|||
m_UsedGlyphRects: [] |
|||
m_FreeGlyphRects: |
|||
- m_X: 0 |
|||
m_Y: 0 |
|||
m_Width: 511 |
|||
m_Height: 511 |
|||
m_fontInfo: |
|||
Name: Liberation Sans |
|||
PointSize: 86 |
|||
Scale: 1 |
|||
CharacterCount: 250 |
|||
LineHeight: 98.90625 |
|||
Baseline: 0 |
|||
Ascender: 77.84375 |
|||
CapHeight: 59.1875 |
|||
Descender: -18.21875 |
|||
CenterLine: 0 |
|||
SuperscriptOffset: 77.84375 |
|||
SubscriptOffset: -12.261719 |
|||
SubSize: 0.5 |
|||
Underline: -12.261719 |
|||
UnderlineThickness: 6.298828 |
|||
strikethrough: 23.675 |
|||
strikethroughThickness: 0 |
|||
TabWidth: 239.0625 |
|||
Padding: 9 |
|||
AtlasWidth: 1024 |
|||
AtlasHeight: 1024 |
|||
atlas: {fileID: 0} |
|||
m_AtlasWidth: 512 |
|||
m_AtlasHeight: 512 |
|||
m_AtlasPadding: 9 |
|||
m_AtlasRenderMode: 4169 |
|||
m_glyphInfoList: [] |
|||
m_KerningTable: |
|||
kerningPairs: [] |
|||
m_FallbackFontAssetTable: [] |
|||
m_CreationSettings: |
|||
sourceFontFileName: |
|||
sourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75 |
|||
pointSizeSamplingMode: 0 |
|||
pointSize: 86 |
|||
padding: 9 |
|||
packingMode: 4 |
|||
atlasWidth: 512 |
|||
atlasHeight: 512 |
|||
characterSetSelectionMode: 1 |
|||
characterSequence: 32 - 126, 160 - 255, 8192 - 8303, 8364, 8482, 9633 |
|||
referencedFontAssetGUID: 8f586378b4e144a9851e7b34d9b748ee |
|||
referencedTextAssetGUID: |
|||
fontStyle: 0 |
|||
fontStyleModifier: 0 |
|||
renderMode: 4169 |
|||
includeFontFeatures: 1 |
|||
m_FontWeightTable: |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
fontWeights: |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
- regularTypeface: {fileID: 0} |
|||
italicTypeface: {fileID: 0} |
|||
normalStyle: 0 |
|||
normalSpacingOffset: 0 |
|||
boldStyle: 0.75 |
|||
boldSpacing: 7 |
|||
italicStyle: 35 |
|||
tabSize: 10 |
|||
--- !u!28 &28268798066460806 |
|||
Texture2D: |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: LiberationSans SDF Atlas |
|||
m_ImageContentsHash: |
|||
serializedVersion: 2 |
|||
Hash: 00000000000000000000000000000000 |
|||
m_ForcedFallbackFormat: 4 |
|||
m_DownscaleFallback: 0 |
|||
serializedVersion: 2 |
|||
m_Width: 0 |
|||
m_Height: 0 |
|||
m_CompleteImageSize: 0 |
|||
m_TextureFormat: 1 |
|||
m_MipCount: 1 |
|||
m_IsReadable: 1 |
|||
m_StreamingMipmaps: 0 |
|||
m_StreamingMipmapsPriority: 0 |
|||
m_AlphaIsTransparency: 0 |
|||
m_ImageCount: 1 |
|||
m_TextureDimension: 2 |
|||
m_TextureSettings: |
|||
serializedVersion: 2 |
|||
m_FilterMode: 1 |
|||
m_Aniso: 1 |
|||
m_MipBias: 0 |
|||
m_WrapU: 0 |
|||
m_WrapV: 0 |
|||
m_WrapW: 0 |
|||
m_LightmapFormat: 0 |
|||
m_ColorSpace: 0 |
|||
image data: 0 |
|||
_typelessdata: |
|||
m_StreamData: |
|||
offset: 0 |
|||
size: 0 |
|||
path: |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 2e498d1c8094910479dc3e1b768306a4 |
|||
timeCreated: 1484171803 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,104 @@ |
|||
%YAML 1.1 |
|||
%TAG !u! tag:unity3d.com,2011: |
|||
--- !u!21 &2100000 |
|||
Material: |
|||
serializedVersion: 6 |
|||
m_ObjectHideFlags: 0 |
|||
m_CorrespondingSourceObject: {fileID: 0} |
|||
m_PrefabInstance: {fileID: 0} |
|||
m_PrefabAsset: {fileID: 0} |
|||
m_Name: LiberationSans SDF - Outline |
|||
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3} |
|||
m_ShaderKeywords: OUTLINE_ON |
|||
m_LightmapFlags: 5 |
|||
m_EnableInstancingVariants: 0 |
|||
m_DoubleSidedGI: 0 |
|||
m_CustomRenderQueue: -1 |
|||
stringTagMap: {} |
|||
disabledShaderPasses: [] |
|||
m_SavedProperties: |
|||
serializedVersion: 3 |
|||
m_TexEnvs: |
|||
- _BumpMap: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _Cube: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _FaceTex: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _MainTex: |
|||
m_Texture: {fileID: 28684132378477856, guid: 8f586378b4e144a9851e7b34d9b748ee, |
|||
type: 2} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
- _OutlineTex: |
|||
m_Texture: {fileID: 0} |
|||
m_Scale: {x: 1, y: 1} |
|||
m_Offset: {x: 0, y: 0} |
|||
m_Floats: |
|||
- _Ambient: 0.5 |
|||
- _Bevel: 0.5 |
|||
- _BevelClamp: 0 |
|||
- _BevelOffset: 0 |
|||
- _BevelRoundness: 0 |
|||
- _BevelWidth: 0 |
|||
- _BumpFace: 0 |
|||
- _BumpOutline: 0 |
|||
- _ColorMask: 15 |
|||
- _Diffuse: 0.5 |
|||
- _FaceDilate: 0.1 |
|||
- _FaceUVSpeedX: 0 |
|||
- _FaceUVSpeedY: 0 |
|||
- _GlowInner: 0.05 |
|||
- _GlowOffset: 0 |
|||
- _GlowOuter: 0.05 |
|||
- _GlowPower: 0.75 |
|||
- _GradientScale: 10 |
|||
- _LightAngle: 3.1416 |
|||
- _MaskSoftnessX: 0 |
|||
- _MaskSoftnessY: 0 |
|||
- _OutlineSoftness: 0 |
|||
- _OutlineUVSpeedX: 0 |
|||
- _OutlineUVSpeedY: 0 |
|||
- _OutlineWidth: 0.1 |
|||
- _PerspectiveFilter: 0.875 |
|||
- _Reflectivity: 10 |
|||
- _ScaleRatioA: 0.9 |
|||
- _ScaleRatioB: 0.73125 |
|||
- _ScaleRatioC: 0.64125 |
|||
- _ScaleX: 1 |
|||
- _ScaleY: 1 |
|||
- _ShaderFlags: 0 |
|||
- _Sharpness: 0 |
|||
- _SpecularPower: 2 |
|||
- _Stencil: 0 |
|||
- _StencilComp: 8 |
|||
- _StencilOp: 0 |
|||
- _StencilReadMask: 255 |
|||
- _StencilWriteMask: 255 |
|||
- _TextureHeight: 1024 |
|||
- _TextureWidth: 1024 |
|||
- _UnderlayDilate: 0 |
|||
- _UnderlayOffsetX: 0 |
|||
- _UnderlayOffsetY: 0 |
|||
- _UnderlaySoftness: 0 |
|||
- _VertexOffsetX: 0 |
|||
- _VertexOffsetY: 0 |
|||
- _WeightBold: 0.75 |
|||
- _WeightNormal: 0 |
|||
m_Colors: |
|||
- _ClipRect: {r: -32767, g: -32767, b: 32767, a: 32767} |
|||
- _EnvMatrixRotation: {r: 0, g: 0, b: 0, a: 0} |
|||
- _FaceColor: {r: 1, g: 1, b: 1, a: 1} |
|||
- _GlowColor: {r: 0, g: 1, b: 0, a: 0.5} |
|||
- _MaskCoord: {r: 0, g: 0, b: 32767, a: 32767} |
|||
- _OutlineColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _ReflectFaceColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1} |
|||
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1} |
|||
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5} |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 79459efec17a4d00a321bdcc27bbc385 |
|||
timeCreated: 1484172856 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
File diff suppressed because one or more lines are too long
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 8f586378b4e144a9851e7b34d9b748ee |
|||
timeCreated: 1484171803 |
|||
licenseType: Pro |
|||
NativeFormatImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1 @@ |
|||
)]}〕〉》」』】〙〗〟’”⦆»ヽヾーァィゥェォッャュョヮヵヶぁぃぅぇぉっゃゅょゎゕゖㇰㇱㇲㇳㇴㇵㇶㇷㇸㇹㇺㇻㇼㇽㇾㇿ々〻‐゠–〜?!‼⁇⁈⁉・、%,.:;。!?]):;=}¢°"†‡℃〆%,. |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: fade42e8bc714b018fac513c043d323b |
|||
timeCreated: 1425440388 |
|||
licenseType: Store |
|||
TextScriptImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1 @@ |
|||
([{〔〈《「『【〘〖〝‘“⦅«$—…‥〳〴〵\[({£¥"々〇〉》」$⦆¥₩ # |
|||
@ -0,0 +1,8 @@ |
|||
fileFormatVersion: 2 |
|||
guid: d82c1b31c7e74239bff1220585707d2b |
|||
timeCreated: 1425440388 |
|||
licenseType: Store |
|||
TextScriptImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,9 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 99f836c9cb9345dba2e72c4a1f2d0695 |
|||
folderAsset: yes |
|||
timeCreated: 1436068007 |
|||
licenseType: Pro |
|||
DefaultImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,142 @@ |
|||
Shader "TextMeshPro/Bitmap Custom Atlas" { |
|||
|
|||
Properties { |
|||
_MainTex ("Font Atlas", 2D) = "white" {} |
|||
_FaceTex ("Font Texture", 2D) = "white" {} |
|||
_FaceColor ("Text Color", Color) = (1,1,1,1) |
|||
|
|||
_VertexOffsetX ("Vertex OffsetX", float) = 0 |
|||
_VertexOffsetY ("Vertex OffsetY", float) = 0 |
|||
_MaskSoftnessX ("Mask SoftnessX", float) = 0 |
|||
_MaskSoftnessY ("Mask SoftnessY", float) = 0 |
|||
|
|||
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767) |
|||
_Padding ("Padding", float) = 0 |
|||
|
|||
_StencilComp("Stencil Comparison", Float) = 8 |
|||
_Stencil("Stencil ID", Float) = 0 |
|||
_StencilOp("Stencil Operation", Float) = 0 |
|||
_StencilWriteMask("Stencil Write Mask", Float) = 255 |
|||
_StencilReadMask("Stencil Read Mask", Float) = 255 |
|||
|
|||
_ColorMask("Color Mask", Float) = 15 |
|||
} |
|||
|
|||
SubShader{ |
|||
|
|||
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } |
|||
|
|||
Stencil |
|||
{ |
|||
Ref[_Stencil] |
|||
Comp[_StencilComp] |
|||
Pass[_StencilOp] |
|||
ReadMask[_StencilReadMask] |
|||
WriteMask[_StencilWriteMask] |
|||
} |
|||
|
|||
|
|||
Lighting Off |
|||
Cull [_CullMode] |
|||
ZTest [unity_GUIZTestMode] |
|||
ZWrite Off |
|||
Fog { Mode Off } |
|||
Blend SrcAlpha OneMinusSrcAlpha |
|||
ColorMask[_ColorMask] |
|||
|
|||
Pass { |
|||
CGPROGRAM |
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
|
|||
#pragma multi_compile __ UNITY_UI_CLIP_RECT |
|||
#pragma multi_compile __ UNITY_UI_ALPHACLIP |
|||
|
|||
|
|||
#include "UnityCG.cginc" |
|||
|
|||
struct appdata_t { |
|||
float4 vertex : POSITION; |
|||
fixed4 color : COLOR; |
|||
float2 texcoord0 : TEXCOORD0; |
|||
float2 texcoord1 : TEXCOORD1; |
|||
}; |
|||
|
|||
struct v2f { |
|||
float4 vertex : SV_POSITION; |
|||
fixed4 color : COLOR; |
|||
float2 texcoord0 : TEXCOORD0; |
|||
float2 texcoord1 : TEXCOORD1; |
|||
float4 mask : TEXCOORD2; |
|||
}; |
|||
|
|||
uniform sampler2D _MainTex; |
|||
uniform sampler2D _FaceTex; |
|||
uniform float4 _FaceTex_ST; |
|||
uniform fixed4 _FaceColor; |
|||
|
|||
uniform float _VertexOffsetX; |
|||
uniform float _VertexOffsetY; |
|||
uniform float4 _ClipRect; |
|||
uniform float _MaskSoftnessX; |
|||
uniform float _MaskSoftnessY; |
|||
|
|||
float2 UnpackUV(float uv) |
|||
{ |
|||
float2 output; |
|||
output.x = floor(uv / 4096); |
|||
output.y = uv - 4096 * output.x; |
|||
|
|||
return output * 0.001953125; |
|||
} |
|||
|
|||
v2f vert (appdata_t v) |
|||
{ |
|||
float4 vert = v.vertex; |
|||
vert.x += _VertexOffsetX; |
|||
vert.y += _VertexOffsetY; |
|||
|
|||
vert.xy += (vert.w * 0.5) / _ScreenParams.xy; |
|||
|
|||
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert)); |
|||
|
|||
fixed4 faceColor = v.color; |
|||
faceColor *= _FaceColor; |
|||
|
|||
v2f OUT; |
|||
OUT.vertex = vPosition; |
|||
OUT.color = faceColor; |
|||
OUT.texcoord0 = v.texcoord0; |
|||
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex); |
|||
float2 pixelSize = vPosition.w; |
|||
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); |
|||
|
|||
// Clamp _ClipRect to 16bit. |
|||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); |
|||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); |
|||
|
|||
return OUT; |
|||
} |
|||
|
|||
fixed4 frag (v2f IN) : SV_Target |
|||
{ |
|||
fixed4 color = tex2D(_MainTex, IN.texcoord0) * tex2D(_FaceTex, IN.texcoord1) * IN.color; |
|||
|
|||
// Alternative implementation to UnityGet2DClipping with support for softness. |
|||
#if UNITY_UI_CLIP_RECT |
|||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); |
|||
color *= m.x * m.y; |
|||
#endif |
|||
|
|||
#if UNITY_UI_ALPHACLIP |
|||
clip(color.a - 0.001); |
|||
#endif |
|||
|
|||
return color; |
|||
} |
|||
ENDCG |
|||
} |
|||
} |
|||
|
|||
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 48bb5f55d8670e349b6e614913f9d910 |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,144 @@ |
|||
Shader "TextMeshPro/Mobile/Bitmap" { |
|||
|
|||
Properties { |
|||
_MainTex ("Font Atlas", 2D) = "white" {} |
|||
_Color ("Text Color", Color) = (1,1,1,1) |
|||
_DiffusePower ("Diffuse Power", Range(1.0,4.0)) = 1.0 |
|||
|
|||
_VertexOffsetX("Vertex OffsetX", float) = 0 |
|||
_VertexOffsetY("Vertex OffsetY", float) = 0 |
|||
_MaskSoftnessX("Mask SoftnessX", float) = 0 |
|||
_MaskSoftnessY("Mask SoftnessY", float) = 0 |
|||
|
|||
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767) |
|||
|
|||
_StencilComp("Stencil Comparison", Float) = 8 |
|||
_Stencil("Stencil ID", Float) = 0 |
|||
_StencilOp("Stencil Operation", Float) = 0 |
|||
_StencilWriteMask("Stencil Write Mask", Float) = 255 |
|||
_StencilReadMask("Stencil Read Mask", Float) = 255 |
|||
|
|||
_ColorMask("Color Mask", Float) = 15 |
|||
} |
|||
|
|||
SubShader { |
|||
|
|||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } |
|||
|
|||
Stencil |
|||
{ |
|||
Ref[_Stencil] |
|||
Comp[_StencilComp] |
|||
Pass[_StencilOp] |
|||
ReadMask[_StencilReadMask] |
|||
WriteMask[_StencilWriteMask] |
|||
} |
|||
|
|||
|
|||
Lighting Off |
|||
Cull Off |
|||
ZTest [unity_GUIZTestMode] |
|||
ZWrite Off |
|||
Fog { Mode Off } |
|||
Blend SrcAlpha OneMinusSrcAlpha |
|||
ColorMask[_ColorMask] |
|||
|
|||
Pass { |
|||
CGPROGRAM |
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
#pragma fragmentoption ARB_precision_hint_fastest |
|||
|
|||
#pragma multi_compile __ UNITY_UI_CLIP_RECT |
|||
#pragma multi_compile __ UNITY_UI_ALPHACLIP |
|||
|
|||
|
|||
#include "UnityCG.cginc" |
|||
|
|||
struct appdata_t { |
|||
float4 vertex : POSITION; |
|||
fixed4 color : COLOR; |
|||
float2 texcoord0 : TEXCOORD0; |
|||
float2 texcoord1 : TEXCOORD1; |
|||
}; |
|||
|
|||
struct v2f { |
|||
float4 vertex : POSITION; |
|||
fixed4 color : COLOR; |
|||
float2 texcoord0 : TEXCOORD0; |
|||
float4 mask : TEXCOORD2; |
|||
}; |
|||
|
|||
sampler2D _MainTex; |
|||
fixed4 _Color; |
|||
float _DiffusePower; |
|||
|
|||
uniform float _VertexOffsetX; |
|||
uniform float _VertexOffsetY; |
|||
uniform float4 _ClipRect; |
|||
uniform float _MaskSoftnessX; |
|||
uniform float _MaskSoftnessY; |
|||
|
|||
v2f vert (appdata_t v) |
|||
{ |
|||
v2f OUT; |
|||
float4 vert = v.vertex; |
|||
vert.x += _VertexOffsetX; |
|||
vert.y += _VertexOffsetY; |
|||
|
|||
vert.xy += (vert.w * 0.5) / _ScreenParams.xy; |
|||
|
|||
OUT.vertex = UnityPixelSnap(UnityObjectToClipPos(vert)); |
|||
OUT.color = v.color; |
|||
OUT.color *= _Color; |
|||
OUT.color.rgb *= _DiffusePower; |
|||
OUT.texcoord0 = v.texcoord0; |
|||
|
|||
float2 pixelSize = OUT.vertex.w; |
|||
//pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); |
|||
|
|||
// Clamp _ClipRect to 16bit. |
|||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); |
|||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); |
|||
|
|||
return OUT; |
|||
} |
|||
|
|||
fixed4 frag (v2f IN) : COLOR |
|||
{ |
|||
fixed4 color = fixed4(IN.color.rgb, IN.color.a * tex2D(_MainTex, IN.texcoord0).a); |
|||
|
|||
// Alternative implementation to UnityGet2DClipping with support for softness. |
|||
#if UNITY_UI_CLIP_RECT |
|||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); |
|||
color *= m.x * m.y; |
|||
#endif |
|||
|
|||
#if UNITY_UI_ALPHACLIP |
|||
clip(color.a - 0.001); |
|||
#endif |
|||
|
|||
return color; |
|||
} |
|||
ENDCG |
|||
} |
|||
} |
|||
|
|||
SubShader { |
|||
Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" } |
|||
Lighting Off Cull Off ZTest Always ZWrite Off Fog { Mode Off } |
|||
Blend SrcAlpha OneMinusSrcAlpha |
|||
BindChannels { |
|||
Bind "Color", color |
|||
Bind "Vertex", vertex |
|||
Bind "TexCoord", texcoord0 |
|||
} |
|||
Pass { |
|||
SetTexture [_MainTex] { |
|||
constantColor [_Color] combine constant * primary, constant * texture |
|||
} |
|||
} |
|||
} |
|||
|
|||
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 1e3b057af24249748ff873be7fafee47 |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
@ -0,0 +1,142 @@ |
|||
Shader "TextMeshPro/Bitmap" { |
|||
|
|||
Properties { |
|||
_MainTex ("Font Atlas", 2D) = "white" {} |
|||
_FaceTex ("Font Texture", 2D) = "white" {} |
|||
_FaceColor ("Text Color", Color) = (1,1,1,1) |
|||
|
|||
_VertexOffsetX ("Vertex OffsetX", float) = 0 |
|||
_VertexOffsetY ("Vertex OffsetY", float) = 0 |
|||
_MaskSoftnessX ("Mask SoftnessX", float) = 0 |
|||
_MaskSoftnessY ("Mask SoftnessY", float) = 0 |
|||
|
|||
_ClipRect("Clip Rect", vector) = (-32767, -32767, 32767, 32767) |
|||
|
|||
_StencilComp("Stencil Comparison", Float) = 8 |
|||
_Stencil("Stencil ID", Float) = 0 |
|||
_StencilOp("Stencil Operation", Float) = 0 |
|||
_StencilWriteMask("Stencil Write Mask", Float) = 255 |
|||
_StencilReadMask("Stencil Read Mask", Float) = 255 |
|||
|
|||
_ColorMask("Color Mask", Float) = 15 |
|||
} |
|||
|
|||
SubShader{ |
|||
|
|||
Tags { "Queue" = "Transparent" "IgnoreProjector" = "True" "RenderType" = "Transparent" } |
|||
|
|||
Stencil |
|||
{ |
|||
Ref[_Stencil] |
|||
Comp[_StencilComp] |
|||
Pass[_StencilOp] |
|||
ReadMask[_StencilReadMask] |
|||
WriteMask[_StencilWriteMask] |
|||
} |
|||
|
|||
|
|||
Lighting Off |
|||
Cull [_CullMode] |
|||
ZTest [unity_GUIZTestMode] |
|||
ZWrite Off |
|||
Fog { Mode Off } |
|||
Blend SrcAlpha OneMinusSrcAlpha |
|||
ColorMask[_ColorMask] |
|||
|
|||
Pass { |
|||
CGPROGRAM |
|||
#pragma vertex vert |
|||
#pragma fragment frag |
|||
|
|||
#pragma multi_compile __ UNITY_UI_CLIP_RECT |
|||
#pragma multi_compile __ UNITY_UI_ALPHACLIP |
|||
|
|||
|
|||
#include "UnityCG.cginc" |
|||
|
|||
struct appdata_t { |
|||
float4 vertex : POSITION; |
|||
fixed4 color : COLOR; |
|||
float2 texcoord0 : TEXCOORD0; |
|||
float2 texcoord1 : TEXCOORD1; |
|||
}; |
|||
|
|||
struct v2f { |
|||
float4 vertex : SV_POSITION; |
|||
fixed4 color : COLOR; |
|||
float2 texcoord0 : TEXCOORD0; |
|||
float2 texcoord1 : TEXCOORD1; |
|||
float4 mask : TEXCOORD2; |
|||
}; |
|||
|
|||
uniform sampler2D _MainTex; |
|||
uniform sampler2D _FaceTex; |
|||
uniform float4 _FaceTex_ST; |
|||
uniform fixed4 _FaceColor; |
|||
|
|||
uniform float _VertexOffsetX; |
|||
uniform float _VertexOffsetY; |
|||
uniform float4 _ClipRect; |
|||
uniform float _MaskSoftnessX; |
|||
uniform float _MaskSoftnessY; |
|||
|
|||
float2 UnpackUV(float uv) |
|||
{ |
|||
float2 output; |
|||
output.x = floor(uv / 4096); |
|||
output.y = uv - 4096 * output.x; |
|||
|
|||
return output * 0.001953125; |
|||
} |
|||
|
|||
v2f vert (appdata_t v) |
|||
{ |
|||
float4 vert = v.vertex; |
|||
vert.x += _VertexOffsetX; |
|||
vert.y += _VertexOffsetY; |
|||
|
|||
vert.xy += (vert.w * 0.5) / _ScreenParams.xy; |
|||
|
|||
float4 vPosition = UnityPixelSnap(UnityObjectToClipPos(vert)); |
|||
|
|||
fixed4 faceColor = v.color; |
|||
faceColor *= _FaceColor; |
|||
|
|||
v2f OUT; |
|||
OUT.vertex = vPosition; |
|||
OUT.color = faceColor; |
|||
OUT.texcoord0 = v.texcoord0; |
|||
OUT.texcoord1 = TRANSFORM_TEX(UnpackUV(v.texcoord1), _FaceTex); |
|||
float2 pixelSize = vPosition.w; |
|||
pixelSize /= abs(float2(_ScreenParams.x * UNITY_MATRIX_P[0][0], _ScreenParams.y * UNITY_MATRIX_P[1][1])); |
|||
|
|||
// Clamp _ClipRect to 16bit. |
|||
float4 clampedRect = clamp(_ClipRect, -2e10, 2e10); |
|||
OUT.mask = float4(vert.xy * 2 - clampedRect.xy - clampedRect.zw, 0.25 / (0.25 * half2(_MaskSoftnessX, _MaskSoftnessY) + pixelSize.xy)); |
|||
|
|||
return OUT; |
|||
} |
|||
|
|||
fixed4 frag (v2f IN) : SV_Target |
|||
{ |
|||
fixed4 color = tex2D(_MainTex, IN.texcoord0); |
|||
color = fixed4 (tex2D(_FaceTex, IN.texcoord1).rgb * IN.color.rgb, IN.color.a * color.a); |
|||
|
|||
// Alternative implementation to UnityGet2DClipping with support for softness. |
|||
#if UNITY_UI_CLIP_RECT |
|||
half2 m = saturate((_ClipRect.zw - _ClipRect.xy - abs(IN.mask.xy)) * IN.mask.zw); |
|||
color *= m.x * m.y; |
|||
#endif |
|||
|
|||
#if UNITY_UI_ALPHACLIP |
|||
clip(color.a - 0.001); |
|||
#endif |
|||
|
|||
return color; |
|||
} |
|||
ENDCG |
|||
} |
|||
} |
|||
|
|||
CustomEditor "TMPro.EditorUtilities.TMP_BitmapShaderGUI" |
|||
} |
|||
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 128e987d567d4e2c824d754223b3f3b0 |
|||
ShaderImporter: |
|||
defaultTextures: [] |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue