├── Documentation ├── PhiOS_readme.txt └── ezgif-4-5ea6d2a713.gif ├── Fonts ├── BMFonts │ └── Source_Code_Pro │ │ ├── SIL Open Font License.txt │ │ ├── SIL Open Font License.txt.meta │ │ ├── Source_Code_Pro_Semibold_Bitmap.fnt │ │ ├── Source_Code_Pro_Semibold_Bitmap.fnt.meta │ │ ├── Source_Code_Pro_Semibold_Bitmap.mat │ │ ├── Source_Code_Pro_Semibold_Bitmap.mat.meta │ │ ├── Source_Code_Pro_Semibold_Bitmap_0.png │ │ └── Source_Code_Pro_Semibold_Bitmap_0.png.meta ├── REXPaint_Fonts.meta └── REXPaint_Fonts │ ├── CP437_60x60.meta │ ├── CP437_60x60 │ ├── cp437_60x60.mat │ ├── cp437_60x60.mat.meta │ ├── cp437_60x60.png │ └── cp437_60x60.png.meta │ ├── mappings.meta │ └── mappings │ ├── IBMGRAPH.TXT │ └── IBMGRAPH.TXT.meta ├── Materials ├── background_display.mat └── background_display.mat.meta ├── Plugins ├── I18N.West.dll ├── I18N.West.dll.meta ├── I18N.dll └── I18N.dll.meta ├── Prefabs ├── Display │ ├── Display_Quad.prefab │ ├── Display_Quad.prefab.meta │ ├── PhiOS_Bootstrap.prefab │ └── PhiOS_Bootstrap.prefab.meta └── Examples │ ├── Scene_Example.prefab │ └── Scene_Example.prefab.meta ├── README.md ├── Scenes ├── ExampleScene.unity └── ExampleScene.unity.meta ├── Scripts ├── Examples │ ├── Example.cs │ └── Example.cs.meta └── PhiOS │ ├── Actions.meta │ ├── Actions │ ├── IClickAction.cs │ ├── IClickAction.cs.meta │ ├── IDragAction.cs │ ├── IDragAction.cs.meta │ ├── IHoverAction.cs │ ├── IHoverAction.cs.meta │ ├── IScrollAction.cs │ └── IScrollAction.cs.meta │ ├── BitmapFont.cs │ ├── BitmapFont.cs.meta │ ├── BitmapFontGlyph.cs │ ├── BitmapFontGlyph.cs.meta │ ├── Cell.cs │ ├── Cell.cs.meta │ ├── Display.cs │ ├── Display.cs.meta │ ├── DisplayMesh.cs │ ├── DisplayMesh.cs.meta │ ├── Editor.meta │ ├── Editor │ ├── DisplayEditor.cs │ └── DisplayEditor.cs.meta │ ├── Mouse.cs │ └── Mouse.cs.meta └── Shaders ├── AlphaVertexColor.shader └── AlphaVertexColor.shader.meta /Documentation/PhiOS_readme.txt: -------------------------------------------------------------------------------- 1 | PhiOS (ASCII Rendering Engine for Unity) 2 | -------------------------------------------- 3 | VERSION: v0.1 4 | LAST UPDATED: 06/12/2016 5 | AUTHOR: https://twitter.com/phi6 6 | LICENSE: CC BY 4.0 7 | https://creativecommons.org/licenses/by/4.0/ 8 | -------------------------------------------- 9 | 10 | This is the first (base) version of PhiOS, which provides cell rendering, cell stacking/layers, 11 | foreground & background colors, cell transition animations, bitmap font support & rudimentary mouse input. 12 | 13 | The layered windowing system and scrollable UI widgets are not included in this release (yet). 14 | All that stuff will be in future extended versions. SOON™ 15 | 16 | Note: PhiOS does NOT include any post-processing image effects (all that fancy stuff like scanlines, 17 | bloom, CRT monitor distortion, glitches etc... that you may have seen on previous screenshots). 18 | These are all provided by third party plugins, please see the Third Party Effects section below 19 | if you want to replicate your display to look like this. 20 | 21 | Disclaimer: There will probably be bugs and incomplete/missing features! This engine was always intended 22 | to be part of a larger game project, and not as a tool released to the public. However, I'm putting it 23 | out there anyway due to popular request. Code is provided as-is. 24 | 25 | QUICKSTART 26 | ---------- 27 | 1. Import the PhiOS_Base_0_1.unitypackage into your project. 28 | 29 | 2. The best place to start is to check out the ExampleScene under the PhiOS/Scenes folder. 30 | 31 | 3. ExampleScene contains 2 GameObject prefabs, PhiOS_Bootstrap and Scene_Example. 32 | The PhiOS_Bootstrap object is required in all Unity scenes that make use of an ASCII display. 33 | The Scene_Example object contains a MonoBehaviour script showing examples of basic functionality. 34 | 35 | 4. Study the code in the Example.cs script (the one attached to the Scene_Example object) and you'll be 36 | rendering, clearing and animating cells in no time. 37 | 38 | FONTS 39 | ----- 40 | PhiOS uses the default REXPaint Codepage 437 font to help you get started quickly. 41 | You can also use your own fonts in one of two ways :- 42 | 43 | 1. Use a REXPaint-compatible font tileset. This is the preferred method. 44 | - Simply copy and paste the REXPaint font .png directly into your Unity project. 45 | The higher the resolution the better, so I upscaled the default 20x20 font to 60x60 using 46 | Nearest Neighbour scaling in order to preserve the hard pixels. 47 | - Your .png texture should be imported into Unity with the Alpha From Grayscale and bilinear 48 | filtering enabled. 49 | - Create a new material for your font texture, you can use my Phigames/Alpha Vertex Color shader 50 | but any transparent vertex color shader will work. 51 | - Assign this material to the BitmapFont MonoBehaviour component on the Display object of the 52 | bootstrap in your scene hierarchy, under the REXPaint CP437 header. 53 | - Make sure "Use REX Paint Font" IS ticked. 54 | - Ensure texture size and grid size is correct for your .png font texture. 55 | - Bilinear filtering will cause some bleeding artifacts, so set your bleed here to counteract 56 | this. The bleed value of 3 works well with the default font. 57 | - You can use the Quad Height Scale variable to vertically stretch your font. Square fonts 58 | (scale of 1) are preferable for topdown map tiles, but this is less readable as text. The default 1.4 59 | scale seems to be a nice compromise between readable text and aesthetically pleasing map tiles. 60 | 61 | OR... 62 | 63 | 2. Convert a TTF to bitmap using BMFont. I used the following settings to generate the font used by 64 | PhiOS (Source Code Pro from the Font Squirrel website, license is included). 65 | > Font Settings: Size 72px, do not include kerning pairs, use TTF outline, hinting, smoothing, 66 | super sampling level 4 67 | > Export Options: 0 padding, 5 spacing, equalize cell heights, 2048x2048 texture size, white text 68 | with alpha, XML file format, .png textures 69 | - You will require both the .fnt (XML) and .png exported files, drop them both into your Unity project. 70 | - Your .png texture should be imported into Unity with both alpha options and bilinear filtering enabled. 71 | - Create a new material for your font texture, you can use my Phigames/Alpha Vertex Color shader 72 | but any transparent vertex color shader will work. 73 | - Assign your .fnt and material to the BitmapFont MonoBehaviour component on the Display object 74 | of the bootstrap in your scene hierarchy, under the BMFont header. 75 | - Make sure "Use REX Paint Font" is NOT ticked. 76 | - Ensure your glyph height and glyph width (default is 72x34) matches the values in your .fnt (XML) file. 77 | - You can use the Quad Height Scale variable to vertically stretch your font, but as you're using a 78 | TTF it's probably best to keep this at 1, unless you want to artificially make your font square. 79 | 80 | DISPLAY GRID SIZE 81 | ----------------- 82 | By default, PhiOS uses a fixed display width of 80 characters, and then automatically calculates 83 | the height based on the font used, the quad height scale and the screen aspect ratio. It will then 84 | adjust the camera's orthographic size in order to fit the display to the edges of the screen as tightly 85 | as possible. 86 | 87 | If you wish, you can disable the automatic grid height, for cases where you might want a fixed grid 88 | size regardless of screen aspect ratio. Go to the Display MonoBehaviour component on the Display 89 | object of the bootstrap in your scene hierarchy, and untick Auto Display Height. You are now able 90 | to set your grid height manually. 91 | 92 | API QUICKSTART 93 | -------------- 94 | Check the Example.cs script for examples of basic functionality. 95 | Things to note :- 96 | - Make sure you wait until Display.IsInitialized() returns true before updating any cells. 97 | - Grab the cell you want to update by calling Display.CellAt(layer, x, y) 98 | - Update the cell content using Cell.SetContent() 99 | - Clear the cell using Cell.Clear() 100 | - Check out the SetContent() and Clear() function overloads. You can have separate foreground and 101 | background colors, as well as gradual fade transitions between cell updates. 102 | - Only cells on the highest layers are drawn, everything below that cell on lower layers is ignored. 103 | - x,y coordinates start at top left of the screen (0,0) 104 | - Negative layers are reserved layers, and are actually drawn on top of everything else. An example 105 | of this is the mouse cursor, which draws at layer -1. Lower negative layers (such as -2) are prioritized 106 | over higher negative ones. 107 | - You can set a cell to cycle through characters of a string as part of its update transition. 108 | Handy for creating cyberpunky/hacking/glitching effects. 109 | - You can implement one of the action interfaces (IClickAction, IDragAction, IHoverAction, IScrollAction) 110 | and set them to a specific cell in order to capture mouse input for that cell. Or just disable the Mouse 111 | object entirely if you do not require mouse input. 112 | 113 | THIRD PARTY EFFECTS 114 | ------------------- 115 | My screenshots and videos show a variety of post-processing image effects to achieve a certain cyberpunk 116 | CRT aesthetic that I'm using for my games. You can replicate this look by using the following third party 117 | plugins :- 118 | - Bloom from Unity's Standard Effects asset package. 119 | - AnalogTV and Vintage from Thomas Hourdel's Colorful asset package. 120 | - Dirty Lens from Sonic Ether's Natural Bloom asset package. 121 | 122 | CONTACT 123 | ------- 124 | Shout at me on Twitter @phi6 if I've forgotten to explain something important. I'm not officially providing 125 | any significant amount of support for this, but off the record I'm generally happy to help if I can! 126 | 127 | Good luck, and be sure to poke me if you've made something cool! :) -------------------------------------------------------------------------------- /Documentation/ezgif-4-5ea6d2a713.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pblca/PhiOS/ae0aaf235b70053f4d9307723230f4816b631a02/Documentation/ezgif-4-5ea6d2a713.gif -------------------------------------------------------------------------------- /Fonts/BMFonts/Source_Code_Pro/SIL Open Font License.txt: -------------------------------------------------------------------------------- 1 | Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe Systems Incorporated in the United States and/or other countries. 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL 5 | 6 | ----------------------------------------------------------- 7 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 8 | ----------------------------------------------------------- 9 | 10 | PREAMBLE 11 | 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. 12 | 13 | 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. 14 | 15 | DEFINITIONS 16 | "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. 17 | 18 | "Reserved Font Name" refers to any names specified as such after the copyright statement(s). 19 | 20 | "Original Version" refers to the collection of Font Software components as distributed by the Copyright Holder(s). 21 | 22 | "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. 23 | 24 | "Author" refers to any designer, engineer, programmer, technical writer or other person who contributed to the Font Software. 25 | 26 | PERMISSION & CONDITIONS 27 | 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: 28 | 29 | 1) Neither the Font Software nor any of its individual components, in Original or Modified Versions, may be sold by itself. 30 | 31 | 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. 32 | 33 | 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. 34 | 35 | 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. 36 | 37 | 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. 38 | 39 | TERMINATION 40 | This license becomes null and void if any of the above conditions are not met. 41 | 42 | DISCLAIMER 43 | 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. -------------------------------------------------------------------------------- /Fonts/BMFonts/Source_Code_Pro/SIL Open Font License.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 190a9a15a7b169a4685ae9f84951b026 3 | timeCreated: 1477873382 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Fonts/BMFonts/Source_Code_Pro/Source_Code_Pro_Semibold_Bitmap.fnt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0496e0ed0af0c914e955dadac36fe312 3 | timeCreated: 1479406530 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Fonts/BMFonts/Source_Code_Pro/Source_Code_Pro_Semibold_Bitmap.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: Source_Code_Pro_Semibold_Bitmap 10 | m_Shader: {fileID: 4800000, guid: fbe2feefb8a7bd742b1de5d606b4412c, type: 3} 11 | m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION _VERTEXCOLOR 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | - first: 19 | name: _BackTex 20 | second: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - first: 25 | name: _BumpMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - first: 31 | name: _Control 32 | second: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - first: 37 | name: _DecalTex 38 | second: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - first: 43 | name: _DetailAlbedoMap 44 | second: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - first: 49 | name: _DetailBump 50 | second: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - first: 55 | name: _DetailMask 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - first: 61 | name: _DetailNormalMap 62 | second: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - first: 67 | name: _DetailTex 68 | second: 69 | m_Texture: {fileID: 0} 70 | m_Scale: {x: 1, y: 1} 71 | m_Offset: {x: 0, y: 0} 72 | - first: 73 | name: _DownTex 74 | second: 75 | m_Texture: {fileID: 0} 76 | m_Scale: {x: 1, y: 1} 77 | m_Offset: {x: 0, y: 0} 78 | - first: 79 | name: _EmissionMap 80 | second: 81 | m_Texture: {fileID: 0} 82 | m_Scale: {x: 1, y: 1} 83 | m_Offset: {x: 0, y: 0} 84 | - first: 85 | name: _FalloffTex 86 | second: 87 | m_Texture: {fileID: 0} 88 | m_Scale: {x: 1, y: 1} 89 | m_Offset: {x: 0, y: 0} 90 | - first: 91 | name: _FrontTex 92 | second: 93 | m_Texture: {fileID: 0} 94 | m_Scale: {x: 1, y: 1} 95 | m_Offset: {x: 0, y: 0} 96 | - first: 97 | name: _Illum 98 | second: 99 | m_Texture: {fileID: 0} 100 | m_Scale: {x: 1, y: 1} 101 | m_Offset: {x: 0, y: 0} 102 | - first: 103 | name: _LeftTex 104 | second: 105 | m_Texture: {fileID: 0} 106 | m_Scale: {x: 1, y: 1} 107 | m_Offset: {x: 0, y: 0} 108 | - first: 109 | name: _MainBump 110 | second: 111 | m_Texture: {fileID: 0} 112 | m_Scale: {x: 1, y: 1} 113 | m_Offset: {x: 0, y: 0} 114 | - first: 115 | name: _MainTex 116 | second: 117 | m_Texture: {fileID: 2800000, guid: 9703e22a7f4b9b94289eb326e960a38b, type: 3} 118 | m_Scale: {x: 1, y: 1} 119 | m_Offset: {x: 0, y: 0} 120 | - first: 121 | name: _MetallicGlossMap 122 | second: 123 | m_Texture: {fileID: 0} 124 | m_Scale: {x: 1, y: 1} 125 | m_Offset: {x: 0, y: 0} 126 | - first: 127 | name: _Normal0 128 | second: 129 | m_Texture: {fileID: 0} 130 | m_Scale: {x: 1, y: 1} 131 | m_Offset: {x: 0, y: 0} 132 | - first: 133 | name: _Normal1 134 | second: 135 | m_Texture: {fileID: 0} 136 | m_Scale: {x: 1, y: 1} 137 | m_Offset: {x: 0, y: 0} 138 | - first: 139 | name: _Normal2 140 | second: 141 | m_Texture: {fileID: 0} 142 | m_Scale: {x: 1, y: 1} 143 | m_Offset: {x: 0, y: 0} 144 | - first: 145 | name: _Normal3 146 | second: 147 | m_Texture: {fileID: 0} 148 | m_Scale: {x: 1, y: 1} 149 | m_Offset: {x: 0, y: 0} 150 | - first: 151 | name: _OcclusionMap 152 | second: 153 | m_Texture: {fileID: 0} 154 | m_Scale: {x: 1, y: 1} 155 | m_Offset: {x: 0, y: 0} 156 | - first: 157 | name: _ParallaxMap 158 | second: 159 | m_Texture: {fileID: 0} 160 | m_Scale: {x: 1, y: 1} 161 | m_Offset: {x: 0, y: 0} 162 | - first: 163 | name: _Ramp 164 | second: 165 | m_Texture: {fileID: 0} 166 | m_Scale: {x: 1, y: 1} 167 | m_Offset: {x: 0, y: 0} 168 | - first: 169 | name: _RightTex 170 | second: 171 | m_Texture: {fileID: 0} 172 | m_Scale: {x: 1, y: 1} 173 | m_Offset: {x: 0, y: 0} 174 | - first: 175 | name: _ShadowTex 176 | second: 177 | m_Texture: {fileID: 0} 178 | m_Scale: {x: 1, y: 1} 179 | m_Offset: {x: 0, y: 0} 180 | - first: 181 | name: _SpecGlossMap 182 | second: 183 | m_Texture: {fileID: 0} 184 | m_Scale: {x: 1, y: 1} 185 | m_Offset: {x: 0, y: 0} 186 | - first: 187 | name: _Splat0 188 | second: 189 | m_Texture: {fileID: 0} 190 | m_Scale: {x: 1, y: 1} 191 | m_Offset: {x: 0, y: 0} 192 | - first: 193 | name: _Splat1 194 | second: 195 | m_Texture: {fileID: 0} 196 | m_Scale: {x: 1, y: 1} 197 | m_Offset: {x: 0, y: 0} 198 | - first: 199 | name: _Splat2 200 | second: 201 | m_Texture: {fileID: 0} 202 | m_Scale: {x: 1, y: 1} 203 | m_Offset: {x: 0, y: 0} 204 | - first: 205 | name: _Splat3 206 | second: 207 | m_Texture: {fileID: 0} 208 | m_Scale: {x: 1, y: 1} 209 | m_Offset: {x: 0, y: 0} 210 | - first: 211 | name: _ToonShade 212 | second: 213 | m_Texture: {fileID: 0} 214 | m_Scale: {x: 1, y: 1} 215 | m_Offset: {x: 0, y: 0} 216 | - first: 217 | name: _UpTex 218 | second: 219 | m_Texture: {fileID: 0} 220 | m_Scale: {x: 1, y: 1} 221 | m_Offset: {x: 0, y: 0} 222 | m_Floats: 223 | - first: 224 | name: PixelSnap 225 | second: 0 226 | - first: 227 | name: _BumpScale 228 | second: 1 229 | - first: 230 | name: _ColorMask 231 | second: 15 232 | - first: 233 | name: _Cutoff 234 | second: 0.5 235 | - first: 236 | name: _DetailNormalMapScale 237 | second: 1 238 | - first: 239 | name: _DstBlend 240 | second: 10 241 | - first: 242 | name: _EdgeLength 243 | second: 10 244 | - first: 245 | name: _Emission 246 | second: 1 247 | - first: 248 | name: _Exposure 249 | second: 1 250 | - first: 251 | name: _GlossMapScale 252 | second: 1 253 | - first: 254 | name: _Glossiness 255 | second: 1 256 | - first: 257 | name: _GlossyReflections 258 | second: 1 259 | - first: 260 | name: _IntensityVC 261 | second: 1 262 | - first: 263 | name: _InvFade 264 | second: 1 265 | - first: 266 | name: _Metallic 267 | second: 0 268 | - first: 269 | name: _Mode 270 | second: 3 271 | - first: 272 | name: _OcclusionStrength 273 | second: 1 274 | - first: 275 | name: _Parallax 276 | second: 0.02 277 | - first: 278 | name: _Rotation 279 | second: 0 280 | - first: 281 | name: _Shininess 282 | second: 0.01 283 | - first: 284 | name: _SmoothnessTextureChannel 285 | second: 0 286 | - first: 287 | name: _SpecularHighlights 288 | second: 1 289 | - first: 290 | name: _SrcBlend 291 | second: 1 292 | - first: 293 | name: _Stencil 294 | second: 0 295 | - first: 296 | name: _StencilComp 297 | second: 8 298 | - first: 299 | name: _StencilOp 300 | second: 0 301 | - first: 302 | name: _StencilReadMask 303 | second: 255 304 | - first: 305 | name: _StencilWriteMask 306 | second: 255 307 | - first: 308 | name: _Strength 309 | second: 0.2 310 | - first: 311 | name: _UVSec 312 | second: 0 313 | - first: 314 | name: _UseUIAlphaClip 315 | second: 0 316 | - first: 317 | name: _ZWrite 318 | second: 0 319 | m_Colors: 320 | - first: 321 | name: _Color 322 | second: {r: 0.5882353, g: 0.5882353, b: 0.5882353, a: 1} 323 | - first: 324 | name: _EmisColor 325 | second: {r: 1, g: 1, b: 1, a: 1} 326 | - first: 327 | name: _Emission 328 | second: {r: 1, g: 1, b: 1, a: 1} 329 | - first: 330 | name: _EmissionColor 331 | second: {r: 0, g: 0, b: 0, a: 1} 332 | - first: 333 | name: _SpecColor 334 | second: {r: 1, g: 1, b: 1, a: 1} 335 | - first: 336 | name: _Specular 337 | second: {r: 0, g: 0, b: 0, a: 0} 338 | - first: 339 | name: _Tint 340 | second: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 341 | - first: 342 | name: _TintColor 343 | second: {r: 1, g: 1, b: 1, a: 1} 344 | -------------------------------------------------------------------------------- /Fonts/BMFonts/Source_Code_Pro/Source_Code_Pro_Semibold_Bitmap.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43f4a1196e928b441895d3b6d3519e19 3 | timeCreated: 1478741749 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Fonts/BMFonts/Source_Code_Pro/Source_Code_Pro_Semibold_Bitmap_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pblca/PhiOS/ae0aaf235b70053f4d9307723230f4816b631a02/Fonts/BMFonts/Source_Code_Pro/Source_Code_Pro_Semibold_Bitmap_0.png -------------------------------------------------------------------------------- /Fonts/BMFonts/Source_Code_Pro/Source_Code_Pro_Semibold_Bitmap_0.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9703e22a7f4b9b94289eb326e960a38b 3 | timeCreated: 1479406530 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 1 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 0 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 1 49 | spriteTessellationDetail: -1 50 | textureType: 0 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Fonts/REXPaint_Fonts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ee5c983ac4886464bbeed942fdfeba73 3 | folderAsset: yes 4 | timeCreated: 1479918111 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Fonts/REXPaint_Fonts/CP437_60x60.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 17039d8815ee7de4e84bf196addea5aa 3 | folderAsset: yes 4 | timeCreated: 1479951791 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Fonts/REXPaint_Fonts/CP437_60x60/cp437_60x60.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: cp437_60x60 10 | m_Shader: {fileID: 4800000, guid: fbe2feefb8a7bd742b1de5d606b4412c, type: 3} 11 | m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION _VERTEXCOLOR 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | - first: 19 | name: _BackTex 20 | second: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - first: 25 | name: _BumpMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - first: 31 | name: _Control 32 | second: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - first: 37 | name: _DecalTex 38 | second: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - first: 43 | name: _DetailAlbedoMap 44 | second: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - first: 49 | name: _DetailBump 50 | second: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - first: 55 | name: _DetailMask 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - first: 61 | name: _DetailNormalMap 62 | second: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - first: 67 | name: _DetailTex 68 | second: 69 | m_Texture: {fileID: 0} 70 | m_Scale: {x: 1, y: 1} 71 | m_Offset: {x: 0, y: 0} 72 | - first: 73 | name: _DownTex 74 | second: 75 | m_Texture: {fileID: 0} 76 | m_Scale: {x: 1, y: 1} 77 | m_Offset: {x: 0, y: 0} 78 | - first: 79 | name: _EmissionMap 80 | second: 81 | m_Texture: {fileID: 0} 82 | m_Scale: {x: 1, y: 1} 83 | m_Offset: {x: 0, y: 0} 84 | - first: 85 | name: _FalloffTex 86 | second: 87 | m_Texture: {fileID: 0} 88 | m_Scale: {x: 1, y: 1} 89 | m_Offset: {x: 0, y: 0} 90 | - first: 91 | name: _FrontTex 92 | second: 93 | m_Texture: {fileID: 0} 94 | m_Scale: {x: 1, y: 1} 95 | m_Offset: {x: 0, y: 0} 96 | - first: 97 | name: _Illum 98 | second: 99 | m_Texture: {fileID: 0} 100 | m_Scale: {x: 1, y: 1} 101 | m_Offset: {x: 0, y: 0} 102 | - first: 103 | name: _LeftTex 104 | second: 105 | m_Texture: {fileID: 0} 106 | m_Scale: {x: 1, y: 1} 107 | m_Offset: {x: 0, y: 0} 108 | - first: 109 | name: _MainBump 110 | second: 111 | m_Texture: {fileID: 0} 112 | m_Scale: {x: 1, y: 1} 113 | m_Offset: {x: 0, y: 0} 114 | - first: 115 | name: _MainTex 116 | second: 117 | m_Texture: {fileID: 2800000, guid: 814d0a06b430d134dbebf98cb3f2e2d6, type: 3} 118 | m_Scale: {x: 1, y: 1} 119 | m_Offset: {x: 0, y: 0} 120 | - first: 121 | name: _MetallicGlossMap 122 | second: 123 | m_Texture: {fileID: 0} 124 | m_Scale: {x: 1, y: 1} 125 | m_Offset: {x: 0, y: 0} 126 | - first: 127 | name: _Normal0 128 | second: 129 | m_Texture: {fileID: 0} 130 | m_Scale: {x: 1, y: 1} 131 | m_Offset: {x: 0, y: 0} 132 | - first: 133 | name: _Normal1 134 | second: 135 | m_Texture: {fileID: 0} 136 | m_Scale: {x: 1, y: 1} 137 | m_Offset: {x: 0, y: 0} 138 | - first: 139 | name: _Normal2 140 | second: 141 | m_Texture: {fileID: 0} 142 | m_Scale: {x: 1, y: 1} 143 | m_Offset: {x: 0, y: 0} 144 | - first: 145 | name: _Normal3 146 | second: 147 | m_Texture: {fileID: 0} 148 | m_Scale: {x: 1, y: 1} 149 | m_Offset: {x: 0, y: 0} 150 | - first: 151 | name: _OcclusionMap 152 | second: 153 | m_Texture: {fileID: 0} 154 | m_Scale: {x: 1, y: 1} 155 | m_Offset: {x: 0, y: 0} 156 | - first: 157 | name: _ParallaxMap 158 | second: 159 | m_Texture: {fileID: 0} 160 | m_Scale: {x: 1, y: 1} 161 | m_Offset: {x: 0, y: 0} 162 | - first: 163 | name: _Ramp 164 | second: 165 | m_Texture: {fileID: 0} 166 | m_Scale: {x: 1, y: 1} 167 | m_Offset: {x: 0, y: 0} 168 | - first: 169 | name: _RightTex 170 | second: 171 | m_Texture: {fileID: 0} 172 | m_Scale: {x: 1, y: 1} 173 | m_Offset: {x: 0, y: 0} 174 | - first: 175 | name: _ShadowTex 176 | second: 177 | m_Texture: {fileID: 0} 178 | m_Scale: {x: 1, y: 1} 179 | m_Offset: {x: 0, y: 0} 180 | - first: 181 | name: _SpecGlossMap 182 | second: 183 | m_Texture: {fileID: 0} 184 | m_Scale: {x: 1, y: 1} 185 | m_Offset: {x: 0, y: 0} 186 | - first: 187 | name: _Splat0 188 | second: 189 | m_Texture: {fileID: 0} 190 | m_Scale: {x: 1, y: 1} 191 | m_Offset: {x: 0, y: 0} 192 | - first: 193 | name: _Splat1 194 | second: 195 | m_Texture: {fileID: 0} 196 | m_Scale: {x: 1, y: 1} 197 | m_Offset: {x: 0, y: 0} 198 | - first: 199 | name: _Splat2 200 | second: 201 | m_Texture: {fileID: 0} 202 | m_Scale: {x: 1, y: 1} 203 | m_Offset: {x: 0, y: 0} 204 | - first: 205 | name: _Splat3 206 | second: 207 | m_Texture: {fileID: 0} 208 | m_Scale: {x: 1, y: 1} 209 | m_Offset: {x: 0, y: 0} 210 | - first: 211 | name: _ToonShade 212 | second: 213 | m_Texture: {fileID: 0} 214 | m_Scale: {x: 1, y: 1} 215 | m_Offset: {x: 0, y: 0} 216 | - first: 217 | name: _UpTex 218 | second: 219 | m_Texture: {fileID: 0} 220 | m_Scale: {x: 1, y: 1} 221 | m_Offset: {x: 0, y: 0} 222 | m_Floats: 223 | - first: 224 | name: PixelSnap 225 | second: 0 226 | - first: 227 | name: _BumpScale 228 | second: 1 229 | - first: 230 | name: _ColorMask 231 | second: 15 232 | - first: 233 | name: _Cutoff 234 | second: 0.5 235 | - first: 236 | name: _DetailNormalMapScale 237 | second: 1 238 | - first: 239 | name: _DstBlend 240 | second: 10 241 | - first: 242 | name: _EdgeLength 243 | second: 10 244 | - first: 245 | name: _Emission 246 | second: 1 247 | - first: 248 | name: _Exposure 249 | second: 1 250 | - first: 251 | name: _GlossMapScale 252 | second: 1 253 | - first: 254 | name: _Glossiness 255 | second: 1 256 | - first: 257 | name: _GlossyReflections 258 | second: 1 259 | - first: 260 | name: _IntensityVC 261 | second: 1 262 | - first: 263 | name: _InvFade 264 | second: 1 265 | - first: 266 | name: _Metallic 267 | second: 0 268 | - first: 269 | name: _Mode 270 | second: 3 271 | - first: 272 | name: _OcclusionStrength 273 | second: 1 274 | - first: 275 | name: _Parallax 276 | second: 0.02 277 | - first: 278 | name: _Rotation 279 | second: 0 280 | - first: 281 | name: _Shininess 282 | second: 0.01 283 | - first: 284 | name: _SmoothnessTextureChannel 285 | second: 0 286 | - first: 287 | name: _SpecularHighlights 288 | second: 1 289 | - first: 290 | name: _SrcBlend 291 | second: 1 292 | - first: 293 | name: _Stencil 294 | second: 0 295 | - first: 296 | name: _StencilComp 297 | second: 8 298 | - first: 299 | name: _StencilOp 300 | second: 0 301 | - first: 302 | name: _StencilReadMask 303 | second: 255 304 | - first: 305 | name: _StencilWriteMask 306 | second: 255 307 | - first: 308 | name: _Strength 309 | second: 0.2 310 | - first: 311 | name: _UVSec 312 | second: 0 313 | - first: 314 | name: _UseUIAlphaClip 315 | second: 0 316 | - first: 317 | name: _ZWrite 318 | second: 0 319 | m_Colors: 320 | - first: 321 | name: _Color 322 | second: {r: 0.5882353, g: 0.5882353, b: 0.5882353, a: 1} 323 | - first: 324 | name: _EmisColor 325 | second: {r: 1, g: 1, b: 1, a: 1} 326 | - first: 327 | name: _Emission 328 | second: {r: 1, g: 1, b: 1, a: 1} 329 | - first: 330 | name: _EmissionColor 331 | second: {r: 0, g: 0, b: 0, a: 1} 332 | - first: 333 | name: _SpecColor 334 | second: {r: 1, g: 1, b: 1, a: 1} 335 | - first: 336 | name: _Specular 337 | second: {r: 0, g: 0, b: 0, a: 0} 338 | - first: 339 | name: _Tint 340 | second: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 341 | - first: 342 | name: _TintColor 343 | second: {r: 1, g: 1, b: 1, a: 1} 344 | -------------------------------------------------------------------------------- /Fonts/REXPaint_Fonts/CP437_60x60/cp437_60x60.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0df989b30b3975543b39c6eca1dd18df 3 | timeCreated: 1479951791 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Fonts/REXPaint_Fonts/CP437_60x60/cp437_60x60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pblca/PhiOS/ae0aaf235b70053f4d9307723230f4816b631a02/Fonts/REXPaint_Fonts/CP437_60x60/cp437_60x60.png -------------------------------------------------------------------------------- /Fonts/REXPaint_Fonts/CP437_60x60/cp437_60x60.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 814d0a06b430d134dbebf98cb3f2e2d6 3 | timeCreated: 1479951791 4 | licenseType: Pro 5 | TextureImporter: 6 | fileIDToRecycleName: {} 7 | serializedVersion: 2 8 | mipmaps: 9 | mipMapMode: 0 10 | enableMipMap: 1 11 | linearTexture: 0 12 | correctGamma: 0 13 | fadeOut: 0 14 | borderMipMap: 0 15 | mipMapFadeDistanceStart: 1 16 | mipMapFadeDistanceEnd: 3 17 | bumpmap: 18 | convertToNormalMap: 0 19 | externalNormalMap: 0 20 | heightScale: 0.25 21 | normalMapFilter: 0 22 | isReadable: 0 23 | grayScaleToAlpha: 1 24 | generateCubemap: 0 25 | cubemapConvolution: 0 26 | cubemapConvolutionSteps: 7 27 | cubemapConvolutionExponent: 1.5 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 1024 31 | textureSettings: 32 | filterMode: 1 33 | aniso: 0 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 1 37 | lightmap: 0 38 | rGBM: 0 39 | compressionQuality: 50 40 | allowsAlphaSplitting: 0 41 | spriteMode: 0 42 | spriteExtrude: 1 43 | spriteMeshType: 1 44 | alignment: 0 45 | spritePivot: {x: 0.5, y: 0.5} 46 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 47 | spritePixelsToUnits: 100 48 | alphaIsTransparency: 0 49 | spriteTessellationDetail: -1 50 | textureType: -1 51 | buildTargetSettings: [] 52 | spriteSheet: 53 | serializedVersion: 2 54 | sprites: [] 55 | outline: [] 56 | spritePackingTag: 57 | userData: 58 | assetBundleName: 59 | assetBundleVariant: 60 | -------------------------------------------------------------------------------- /Fonts/REXPaint_Fonts/mappings.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: de08f01b5ac84d24b8eadf07aa9641c8 3 | folderAsset: yes 4 | timeCreated: 1479855440 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Fonts/REXPaint_Fonts/mappings/IBMGRAPH.TXT: -------------------------------------------------------------------------------- 1 | # 2 | # Name: IBM PC memory-mapped video graphics to Unicode 3 | # Unicode version: 3.0 4 | # Table version: 1.0 5 | # Table format: Format A 6 | # Date: 1999 July 27 7 | # Authors: Ken Whistler 8 | # 9 | # Copyright (c) 1996 - 1999 Unicode, Inc. All Rights reserved. 10 | # 11 | # This file is provided as-is by Unicode, Inc. (The Unicode Consortium). 12 | # No claims are made as to fitness for any particular purpose. No 13 | # warranties of any kind are expressed or implied. The recipient 14 | # agrees to determine applicability of information provided. If this 15 | # file has been provided on optical media by Unicode, Inc., 16 | # the sole remedy for any claim will be exchange of defective media 17 | # within 90 days of receipt. 18 | # 19 | # Unicode, Inc. hereby grants the right to freely use the information 20 | # supplied in this file in the creation of products supporting the 21 | # Unicode Standard, and to make copies of this file in any form for 22 | # internal or external distribution as long as this notice remains 23 | # attached. 24 | # 25 | # General notes: 26 | # 27 | # This table contains the data the Unicode Consortium has on how 28 | # IBM PC memory-mapped video graphics map into Unicode. These are 29 | # the characters commonly seen in positions 0x01..0x1F and 0x7F in 30 | # IBM PC code pages (e.g. code page 437, 850, etc.) 31 | # 32 | # Format: Four tab-separated columns 33 | # Column #1 is the Unicode value (in hex as XXXX) 34 | # Column #2 is the general IBM PC code page values 35 | # for 0x01..0x1F, 0x7F (in hex as XX). For completeness, 36 | # Unicode values which only appear as memory-mapped 37 | # video graphics in code page 864 are shown with their 38 | # standard PC code page values here as well. 39 | # Column #3 is specific to IBM PC code page 864 (Arabic) 40 | # Column #4 the Unicode name (follows a comment sign, '#') 41 | # 42 | # The entries are in Unicode order. 43 | # 44 | # Version history 45 | # 1.0 version new. 46 | # 47 | # Updated versions of this file may be found in: 48 | # 49 | # 50 | # Any comments or problems, contact 51 | # Please note that is an archival address; 52 | # notices will be checked, but do not expect an immediate response. 53 | # 54 | # This table is provided by The Unicode Consortium and is 55 | # not an IBM-supplied mapping. 56 | # 57 | 00A7 15 15 # SECTION SIGN 58 | 00B6 14 14 # PILCROW SIGN 59 | 2022 07 -- # BULLET 60 | 203C 13 13 # DOUBLE EXCLAMATION MARK 61 | 2190 1B 1B # LEFTWARDS ARROW 62 | 2191 18 18 # UPWARDS ARROW 63 | 2192 1A 1A # RIGHTWARDS ARROW 64 | 2193 19 19 # DOWNWARDS ARROW 65 | 2194 1D 1D # LEFT RIGHT ARROW 66 | 2195 12 12 # UP DOWN ARROW 67 | 21A8 17 17 # UP DOWN ARROW WITH BASE 68 | 221F 1C 1C # RIGHT ANGLE 69 | 2302 7F 7F # HOUSE 70 | 2550 CD 05 # BOX DRAWINGS DOUBLE HORIZONTAL 71 | 2551 BA 06 # BOX DRAWINGS DOUBLE VERTICAL 72 | 2554 C9 0D # BOX DRAWINGS DOUBLE DOWN AND RIGHT 73 | 2557 BB 0C # BOW DRAWINGS DOUBLE DOWN AND LEFT 74 | 255A C8 0E # BOX DRAWINGS DOUBLE UP AND RIGHT 75 | 255D BC 0F # BOX DRAWINGS DOUBLE UP AND LEFT 76 | 2560 CC 0A # BOX DRAWINGS DOUBLE VERTICAL AND RIGHT 77 | 2563 B9 08 # BOX DRAWINGS DOUBLE VERTICAL AND LEFT 78 | 2566 CB 09 # BOX DRAWINGS DOUBLE DOWN AND HORIZONTAL 79 | 2569 CA 0B # BOX DRAWINGS DOUBLE UP AND HORIZONTAL 80 | 256C CE 07 # BOX DRAWINGS DOUBLE VERTICAL AND HORIZONTAL 81 | 25AC 16 16 # BLACK RECTANGLE 82 | 25B2 1E 1E # BLACK UP-POINTING TRIANGLE 83 | 25BA 10 10 # BLACK RIGHT-POINTING POINTER 84 | 25BC 1F 1F # BLACK DOWN-POINTING TRIANGLE 85 | 25C4 11 11 # BLACK LEFT-POINTING POINTER 86 | 25CB 09 -- # WHITE CIRCLE 87 | 25D8 08 -- # INVERSE BULLET 88 | 25D9 0A -- # INVERSE WHITE CIRCLE 89 | 263A 01 01 # WHITE SMILING FACE 90 | 263B 02 -- # BLACK SMILING FACE 91 | 263C 0F 04 # WHITE SUN WITH RAYS 92 | 2640 0C -- # FEMALE SIGN 93 | 2642 0B -- # MALE SIGN 94 | 2660 06 -- # BLACK SPADE SUIT 95 | 2663 05 -- # BLACK CLUB SUIT 96 | 2665 03 -- # BLACK HEART SUIT 97 | 2666 04 -- # BLACK DIAMOND SUIT 98 | 266A 0D 02 # EIGHTH NOTE 99 | 266B 0E 03 # BEAMED EIGHTH NOTES 100 | -------------------------------------------------------------------------------- /Fonts/REXPaint_Fonts/mappings/IBMGRAPH.TXT.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3098396696b411489c43df4bc1ec83c 3 | timeCreated: 1479855440 4 | licenseType: Pro 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Materials/background_display.mat: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!21 &2100000 4 | Material: 5 | serializedVersion: 6 6 | m_ObjectHideFlags: 0 7 | m_PrefabParentObject: {fileID: 0} 8 | m_PrefabInternal: {fileID: 0} 9 | m_Name: background_display 10 | m_Shader: {fileID: 4800000, guid: fbe2feefb8a7bd742b1de5d606b4412c, type: 3} 11 | m_ShaderKeywords: _ALPHAPREMULTIPLY_ON _EMISSION _VERTEXCOLOR 12 | m_LightmapFlags: 1 13 | m_CustomRenderQueue: -1 14 | stringTagMap: {} 15 | m_SavedProperties: 16 | serializedVersion: 2 17 | m_TexEnvs: 18 | - first: 19 | name: _BackTex 20 | second: 21 | m_Texture: {fileID: 0} 22 | m_Scale: {x: 1, y: 1} 23 | m_Offset: {x: 0, y: 0} 24 | - first: 25 | name: _BumpMap 26 | second: 27 | m_Texture: {fileID: 0} 28 | m_Scale: {x: 1, y: 1} 29 | m_Offset: {x: 0, y: 0} 30 | - first: 31 | name: _Control 32 | second: 33 | m_Texture: {fileID: 0} 34 | m_Scale: {x: 1, y: 1} 35 | m_Offset: {x: 0, y: 0} 36 | - first: 37 | name: _DecalTex 38 | second: 39 | m_Texture: {fileID: 0} 40 | m_Scale: {x: 1, y: 1} 41 | m_Offset: {x: 0, y: 0} 42 | - first: 43 | name: _DetailAlbedoMap 44 | second: 45 | m_Texture: {fileID: 0} 46 | m_Scale: {x: 1, y: 1} 47 | m_Offset: {x: 0, y: 0} 48 | - first: 49 | name: _DetailBump 50 | second: 51 | m_Texture: {fileID: 0} 52 | m_Scale: {x: 1, y: 1} 53 | m_Offset: {x: 0, y: 0} 54 | - first: 55 | name: _DetailMask 56 | second: 57 | m_Texture: {fileID: 0} 58 | m_Scale: {x: 1, y: 1} 59 | m_Offset: {x: 0, y: 0} 60 | - first: 61 | name: _DetailNormalMap 62 | second: 63 | m_Texture: {fileID: 0} 64 | m_Scale: {x: 1, y: 1} 65 | m_Offset: {x: 0, y: 0} 66 | - first: 67 | name: _DetailTex 68 | second: 69 | m_Texture: {fileID: 0} 70 | m_Scale: {x: 1, y: 1} 71 | m_Offset: {x: 0, y: 0} 72 | - first: 73 | name: _DownTex 74 | second: 75 | m_Texture: {fileID: 0} 76 | m_Scale: {x: 1, y: 1} 77 | m_Offset: {x: 0, y: 0} 78 | - first: 79 | name: _EmissionMap 80 | second: 81 | m_Texture: {fileID: 0} 82 | m_Scale: {x: 1, y: 1} 83 | m_Offset: {x: 0, y: 0} 84 | - first: 85 | name: _FalloffTex 86 | second: 87 | m_Texture: {fileID: 0} 88 | m_Scale: {x: 1, y: 1} 89 | m_Offset: {x: 0, y: 0} 90 | - first: 91 | name: _FrontTex 92 | second: 93 | m_Texture: {fileID: 0} 94 | m_Scale: {x: 1, y: 1} 95 | m_Offset: {x: 0, y: 0} 96 | - first: 97 | name: _Illum 98 | second: 99 | m_Texture: {fileID: 0} 100 | m_Scale: {x: 1, y: 1} 101 | m_Offset: {x: 0, y: 0} 102 | - first: 103 | name: _LeftTex 104 | second: 105 | m_Texture: {fileID: 0} 106 | m_Scale: {x: 1, y: 1} 107 | m_Offset: {x: 0, y: 0} 108 | - first: 109 | name: _MainBump 110 | second: 111 | m_Texture: {fileID: 0} 112 | m_Scale: {x: 1, y: 1} 113 | m_Offset: {x: 0, y: 0} 114 | - first: 115 | name: _MainTex 116 | second: 117 | m_Texture: {fileID: 0} 118 | m_Scale: {x: 1, y: 1} 119 | m_Offset: {x: 0, y: 0} 120 | - first: 121 | name: _MetallicGlossMap 122 | second: 123 | m_Texture: {fileID: 0} 124 | m_Scale: {x: 1, y: 1} 125 | m_Offset: {x: 0, y: 0} 126 | - first: 127 | name: _Normal0 128 | second: 129 | m_Texture: {fileID: 0} 130 | m_Scale: {x: 1, y: 1} 131 | m_Offset: {x: 0, y: 0} 132 | - first: 133 | name: _Normal1 134 | second: 135 | m_Texture: {fileID: 0} 136 | m_Scale: {x: 1, y: 1} 137 | m_Offset: {x: 0, y: 0} 138 | - first: 139 | name: _Normal2 140 | second: 141 | m_Texture: {fileID: 0} 142 | m_Scale: {x: 1, y: 1} 143 | m_Offset: {x: 0, y: 0} 144 | - first: 145 | name: _Normal3 146 | second: 147 | m_Texture: {fileID: 0} 148 | m_Scale: {x: 1, y: 1} 149 | m_Offset: {x: 0, y: 0} 150 | - first: 151 | name: _OcclusionMap 152 | second: 153 | m_Texture: {fileID: 0} 154 | m_Scale: {x: 1, y: 1} 155 | m_Offset: {x: 0, y: 0} 156 | - first: 157 | name: _ParallaxMap 158 | second: 159 | m_Texture: {fileID: 0} 160 | m_Scale: {x: 1, y: 1} 161 | m_Offset: {x: 0, y: 0} 162 | - first: 163 | name: _Ramp 164 | second: 165 | m_Texture: {fileID: 0} 166 | m_Scale: {x: 1, y: 1} 167 | m_Offset: {x: 0, y: 0} 168 | - first: 169 | name: _RightTex 170 | second: 171 | m_Texture: {fileID: 0} 172 | m_Scale: {x: 1, y: 1} 173 | m_Offset: {x: 0, y: 0} 174 | - first: 175 | name: _ShadowTex 176 | second: 177 | m_Texture: {fileID: 0} 178 | m_Scale: {x: 1, y: 1} 179 | m_Offset: {x: 0, y: 0} 180 | - first: 181 | name: _SpecGlossMap 182 | second: 183 | m_Texture: {fileID: 0} 184 | m_Scale: {x: 1, y: 1} 185 | m_Offset: {x: 0, y: 0} 186 | - first: 187 | name: _Splat0 188 | second: 189 | m_Texture: {fileID: 0} 190 | m_Scale: {x: 1, y: 1} 191 | m_Offset: {x: 0, y: 0} 192 | - first: 193 | name: _Splat1 194 | second: 195 | m_Texture: {fileID: 0} 196 | m_Scale: {x: 1, y: 1} 197 | m_Offset: {x: 0, y: 0} 198 | - first: 199 | name: _Splat2 200 | second: 201 | m_Texture: {fileID: 0} 202 | m_Scale: {x: 1, y: 1} 203 | m_Offset: {x: 0, y: 0} 204 | - first: 205 | name: _Splat3 206 | second: 207 | m_Texture: {fileID: 0} 208 | m_Scale: {x: 1, y: 1} 209 | m_Offset: {x: 0, y: 0} 210 | - first: 211 | name: _ToonShade 212 | second: 213 | m_Texture: {fileID: 0} 214 | m_Scale: {x: 1, y: 1} 215 | m_Offset: {x: 0, y: 0} 216 | - first: 217 | name: _UpTex 218 | second: 219 | m_Texture: {fileID: 0} 220 | m_Scale: {x: 1, y: 1} 221 | m_Offset: {x: 0, y: 0} 222 | m_Floats: 223 | - first: 224 | name: PixelSnap 225 | second: 0 226 | - first: 227 | name: _BumpScale 228 | second: 1 229 | - first: 230 | name: _ColorMask 231 | second: 15 232 | - first: 233 | name: _Cutoff 234 | second: 0.5 235 | - first: 236 | name: _DetailNormalMapScale 237 | second: 1 238 | - first: 239 | name: _DstBlend 240 | second: 10 241 | - first: 242 | name: _EdgeLength 243 | second: 10 244 | - first: 245 | name: _Emission 246 | second: 1 247 | - first: 248 | name: _Exposure 249 | second: 1 250 | - first: 251 | name: _GlossMapScale 252 | second: 1 253 | - first: 254 | name: _Glossiness 255 | second: 1 256 | - first: 257 | name: _GlossyReflections 258 | second: 1 259 | - first: 260 | name: _IntensityVC 261 | second: 1 262 | - first: 263 | name: _InvFade 264 | second: 1 265 | - first: 266 | name: _Metallic 267 | second: 0 268 | - first: 269 | name: _Mode 270 | second: 3 271 | - first: 272 | name: _OcclusionStrength 273 | second: 1 274 | - first: 275 | name: _Parallax 276 | second: 0.02 277 | - first: 278 | name: _Rotation 279 | second: 0 280 | - first: 281 | name: _Shininess 282 | second: 0.01 283 | - first: 284 | name: _SmoothnessTextureChannel 285 | second: 0 286 | - first: 287 | name: _SpecularHighlights 288 | second: 1 289 | - first: 290 | name: _SrcBlend 291 | second: 1 292 | - first: 293 | name: _Stencil 294 | second: 0 295 | - first: 296 | name: _StencilComp 297 | second: 8 298 | - first: 299 | name: _StencilOp 300 | second: 0 301 | - first: 302 | name: _StencilReadMask 303 | second: 255 304 | - first: 305 | name: _StencilWriteMask 306 | second: 255 307 | - first: 308 | name: _Strength 309 | second: 0.2 310 | - first: 311 | name: _UVSec 312 | second: 0 313 | - first: 314 | name: _UseUIAlphaClip 315 | second: 0 316 | - first: 317 | name: _ZWrite 318 | second: 0 319 | m_Colors: 320 | - first: 321 | name: _Color 322 | second: {r: 0.5882353, g: 0.5882353, b: 0.5882353, a: 1} 323 | - first: 324 | name: _EmisColor 325 | second: {r: 1, g: 1, b: 1, a: 1} 326 | - first: 327 | name: _Emission 328 | second: {r: 1, g: 1, b: 1, a: 1} 329 | - first: 330 | name: _EmissionColor 331 | second: {r: 0, g: 0, b: 0, a: 1} 332 | - first: 333 | name: _SpecColor 334 | second: {r: 1, g: 1, b: 1, a: 1} 335 | - first: 336 | name: _Specular 337 | second: {r: 0, g: 0, b: 0, a: 0} 338 | - first: 339 | name: _Tint 340 | second: {r: 0.5, g: 0.5, b: 0.5, a: 0.5} 341 | - first: 342 | name: _TintColor 343 | second: {r: 1, g: 1, b: 1, a: 1} 344 | -------------------------------------------------------------------------------- /Materials/background_display.mat.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0c7e276f0922a374c902e5468ffc8ce8 3 | timeCreated: 1478741749 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Plugins/I18N.West.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pblca/PhiOS/ae0aaf235b70053f4d9307723230f4816b631a02/Plugins/I18N.West.dll -------------------------------------------------------------------------------- /Plugins/I18N.West.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00899ade977f4f04abfeb92dd0a599e3 3 | timeCreated: 1479933559 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Plugins/I18N.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pblca/PhiOS/ae0aaf235b70053f4d9307723230f4816b631a02/Plugins/I18N.dll -------------------------------------------------------------------------------- /Plugins/I18N.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1097115415d8650469c065debf9c6b4f 3 | timeCreated: 1479933560 4 | licenseType: Pro 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Prefabs/Display/Display_Quad.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000010722400042} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010722400042 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 4 20 | m_Component: 21 | - 4: {fileID: 4000011537233046} 22 | - 33: {fileID: 33000013110039914} 23 | - 23: {fileID: 23000012093556676} 24 | m_Layer: 5 25 | m_Name: Display_Quad 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!4 &4000011537233046 32 | Transform: 33 | m_ObjectHideFlags: 1 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | m_GameObject: {fileID: 1000010722400042} 37 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 38 | m_LocalPosition: {x: 0, y: 0, z: 0} 39 | m_LocalScale: {x: 1, y: 1, z: 1} 40 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 41 | m_Children: [] 42 | m_Father: {fileID: 0} 43 | m_RootOrder: 0 44 | --- !u!23 &23000012093556676 45 | MeshRenderer: 46 | m_ObjectHideFlags: 1 47 | m_PrefabParentObject: {fileID: 0} 48 | m_PrefabInternal: {fileID: 100100000} 49 | m_GameObject: {fileID: 1000010722400042} 50 | m_Enabled: 1 51 | m_CastShadows: 0 52 | m_ReceiveShadows: 0 53 | m_MotionVectors: 1 54 | m_LightProbeUsage: 1 55 | m_ReflectionProbeUsage: 1 56 | m_Materials: [] 57 | m_SubsetIndices: 58 | m_StaticBatchRoot: {fileID: 0} 59 | m_ProbeAnchor: {fileID: 0} 60 | m_LightProbeVolumeOverride: {fileID: 0} 61 | m_ScaleInLightmap: 1 62 | m_PreserveUVs: 1 63 | m_IgnoreNormalsForChartDetection: 0 64 | m_ImportantGI: 0 65 | m_SelectedWireframeHidden: 0 66 | m_MinimumChartSize: 4 67 | m_AutoUVMaxDistance: 0.5 68 | m_AutoUVMaxAngle: 89 69 | m_LightmapParameters: {fileID: 0} 70 | m_SortingLayerID: 0 71 | m_SortingOrder: 0 72 | --- !u!33 &33000013110039914 73 | MeshFilter: 74 | m_ObjectHideFlags: 1 75 | m_PrefabParentObject: {fileID: 0} 76 | m_PrefabInternal: {fileID: 100100000} 77 | m_GameObject: {fileID: 1000010722400042} 78 | m_Mesh: {fileID: 10210, guid: 0000000000000000e000000000000000, type: 0} 79 | -------------------------------------------------------------------------------- /Prefabs/Display/Display_Quad.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b25ef5045c06464facf157f0df521af 3 | timeCreated: 1479202418 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/Display/PhiOS_Bootstrap.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000013727009032} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000010750167884 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 4 20 | m_Component: 21 | - 4: {fileID: 4000011286441928} 22 | - 114: {fileID: 114000012485805544} 23 | - 114: {fileID: 114000013610232378} 24 | m_Layer: 5 25 | m_Name: Display 26 | m_TagString: Untagged 27 | m_Icon: {fileID: 0} 28 | m_NavMeshLayer: 0 29 | m_StaticEditorFlags: 0 30 | m_IsActive: 1 31 | --- !u!1 &1000010861509900 32 | GameObject: 33 | m_ObjectHideFlags: 0 34 | m_PrefabParentObject: {fileID: 0} 35 | m_PrefabInternal: {fileID: 100100000} 36 | serializedVersion: 4 37 | m_Component: 38 | - 4: {fileID: 4000010188838088} 39 | - 114: {fileID: 114000014031879530} 40 | m_Layer: 0 41 | m_Name: Mouse 42 | m_TagString: Untagged 43 | m_Icon: {fileID: 0} 44 | m_NavMeshLayer: 0 45 | m_StaticEditorFlags: 0 46 | m_IsActive: 1 47 | --- !u!1 &1000010886032980 48 | GameObject: 49 | m_ObjectHideFlags: 1 50 | m_PrefabParentObject: {fileID: 0} 51 | m_PrefabInternal: {fileID: 100100000} 52 | serializedVersion: 4 53 | m_Component: 54 | - 4: {fileID: 4000012021375218} 55 | - 114: {fileID: 114000013563964176} 56 | m_Layer: 5 57 | m_Name: Foreground 58 | m_TagString: Untagged 59 | m_Icon: {fileID: 0} 60 | m_NavMeshLayer: 0 61 | m_StaticEditorFlags: 0 62 | m_IsActive: 1 63 | --- !u!1 &1000011585187954 64 | GameObject: 65 | m_ObjectHideFlags: 0 66 | m_PrefabParentObject: {fileID: 0} 67 | m_PrefabInternal: {fileID: 100100000} 68 | serializedVersion: 4 69 | m_Component: 70 | - 4: {fileID: 4000010168063086} 71 | - 20: {fileID: 20000013744435474} 72 | - 81: {fileID: 81000011265427336} 73 | m_Layer: 0 74 | m_Name: Main_Camera 75 | m_TagString: MainCamera 76 | m_Icon: {fileID: 0} 77 | m_NavMeshLayer: 0 78 | m_StaticEditorFlags: 0 79 | m_IsActive: 1 80 | --- !u!1 &1000013727009032 81 | GameObject: 82 | m_ObjectHideFlags: 0 83 | m_PrefabParentObject: {fileID: 0} 84 | m_PrefabInternal: {fileID: 100100000} 85 | serializedVersion: 4 86 | m_Component: 87 | - 4: {fileID: 4000010040037034} 88 | m_Layer: 0 89 | m_Name: PhiOS_Bootstrap 90 | m_TagString: Untagged 91 | m_Icon: {fileID: 0} 92 | m_NavMeshLayer: 0 93 | m_StaticEditorFlags: 0 94 | m_IsActive: 1 95 | --- !u!1 &1000013751693194 96 | GameObject: 97 | m_ObjectHideFlags: 1 98 | m_PrefabParentObject: {fileID: 0} 99 | m_PrefabInternal: {fileID: 100100000} 100 | serializedVersion: 4 101 | m_Component: 102 | - 4: {fileID: 4000012704876012} 103 | - 114: {fileID: 114000011961259074} 104 | m_Layer: 5 105 | m_Name: Background 106 | m_TagString: Untagged 107 | m_Icon: {fileID: 0} 108 | m_NavMeshLayer: 0 109 | m_StaticEditorFlags: 0 110 | m_IsActive: 1 111 | --- !u!4 &4000010040037034 112 | Transform: 113 | m_ObjectHideFlags: 1 114 | m_PrefabParentObject: {fileID: 0} 115 | m_PrefabInternal: {fileID: 100100000} 116 | m_GameObject: {fileID: 1000013727009032} 117 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 118 | m_LocalPosition: {x: 0, y: 0, z: 0} 119 | m_LocalScale: {x: 1, y: 1, z: 1} 120 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 121 | m_Children: 122 | - {fileID: 4000010168063086} 123 | - {fileID: 4000011286441928} 124 | - {fileID: 4000010188838088} 125 | m_Father: {fileID: 0} 126 | m_RootOrder: 0 127 | --- !u!4 &4000010168063086 128 | Transform: 129 | m_ObjectHideFlags: 1 130 | m_PrefabParentObject: {fileID: 0} 131 | m_PrefabInternal: {fileID: 100100000} 132 | m_GameObject: {fileID: 1000011585187954} 133 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 134 | m_LocalPosition: {x: 0, y: 0, z: -10} 135 | m_LocalScale: {x: 1, y: 1, z: 1} 136 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 137 | m_Children: [] 138 | m_Father: {fileID: 4000010040037034} 139 | m_RootOrder: 0 140 | --- !u!4 &4000010188838088 141 | Transform: 142 | m_ObjectHideFlags: 1 143 | m_PrefabParentObject: {fileID: 0} 144 | m_PrefabInternal: {fileID: 100100000} 145 | m_GameObject: {fileID: 1000010861509900} 146 | m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} 147 | m_LocalPosition: {x: 0, y: 0, z: 0} 148 | m_LocalScale: {x: 1, y: 1, z: 1} 149 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 150 | m_Children: [] 151 | m_Father: {fileID: 4000010040037034} 152 | m_RootOrder: 2 153 | --- !u!4 &4000011286441928 154 | Transform: 155 | m_ObjectHideFlags: 1 156 | m_PrefabParentObject: {fileID: 0} 157 | m_PrefabInternal: {fileID: 100100000} 158 | m_GameObject: {fileID: 1000010750167884} 159 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 160 | m_LocalPosition: {x: 0, y: 0, z: 0} 161 | m_LocalScale: {x: 1, y: 1, z: 1} 162 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 163 | m_Children: 164 | - {fileID: 4000012704876012} 165 | - {fileID: 4000012021375218} 166 | m_Father: {fileID: 4000010040037034} 167 | m_RootOrder: 1 168 | --- !u!4 &4000012021375218 169 | Transform: 170 | m_ObjectHideFlags: 1 171 | m_PrefabParentObject: {fileID: 0} 172 | m_PrefabInternal: {fileID: 100100000} 173 | m_GameObject: {fileID: 1000010886032980} 174 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 175 | m_LocalPosition: {x: 0, y: 0, z: 0} 176 | m_LocalScale: {x: 1, y: 1, z: 1} 177 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 178 | m_Children: [] 179 | m_Father: {fileID: 4000011286441928} 180 | m_RootOrder: 1 181 | --- !u!4 &4000012704876012 182 | Transform: 183 | m_ObjectHideFlags: 1 184 | m_PrefabParentObject: {fileID: 0} 185 | m_PrefabInternal: {fileID: 100100000} 186 | m_GameObject: {fileID: 1000013751693194} 187 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 188 | m_LocalPosition: {x: 0, y: 0, z: 0} 189 | m_LocalScale: {x: 1, y: 1, z: 1} 190 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 191 | m_Children: [] 192 | m_Father: {fileID: 4000011286441928} 193 | m_RootOrder: 0 194 | --- !u!20 &20000013744435474 195 | Camera: 196 | m_ObjectHideFlags: 1 197 | m_PrefabParentObject: {fileID: 0} 198 | m_PrefabInternal: {fileID: 100100000} 199 | m_GameObject: {fileID: 1000011585187954} 200 | m_Enabled: 1 201 | serializedVersion: 2 202 | m_ClearFlags: 2 203 | m_BackGroundColor: {r: 0.13333334, g: 0.1254902, b: 0.20392159, a: 1} 204 | m_NormalizedViewPortRect: 205 | serializedVersion: 2 206 | x: 0 207 | y: 0 208 | width: 1 209 | height: 1 210 | near clip plane: 0.1 211 | far clip plane: 100 212 | field of view: 60 213 | orthographic: 1 214 | orthographic size: 5 215 | m_Depth: -1 216 | m_CullingMask: 217 | serializedVersion: 2 218 | m_Bits: 32 219 | m_RenderingPath: -1 220 | m_TargetTexture: {fileID: 0} 221 | m_TargetDisplay: 0 222 | m_TargetEye: 3 223 | m_HDR: 0 224 | m_OcclusionCulling: 0 225 | m_StereoConvergence: 10 226 | m_StereoSeparation: 0.022 227 | m_StereoMirrorMode: 0 228 | --- !u!81 &81000011265427336 229 | AudioListener: 230 | m_ObjectHideFlags: 1 231 | m_PrefabParentObject: {fileID: 0} 232 | m_PrefabInternal: {fileID: 100100000} 233 | m_GameObject: {fileID: 1000011585187954} 234 | m_Enabled: 1 235 | --- !u!114 &114000011961259074 236 | MonoBehaviour: 237 | m_ObjectHideFlags: 1 238 | m_PrefabParentObject: {fileID: 0} 239 | m_PrefabInternal: {fileID: 100100000} 240 | m_GameObject: {fileID: 1000013751693194} 241 | m_Enabled: 1 242 | m_EditorHideFlags: 0 243 | m_Script: {fileID: 11500000, guid: 75dbc0f80ebb6f342a716eaadcb721c9, type: 3} 244 | m_Name: 245 | m_EditorClassIdentifier: 246 | mesh: {fileID: 0} 247 | meshVertices: [] 248 | meshUVs: [] 249 | meshColors: [] 250 | --- !u!114 &114000012485805544 251 | MonoBehaviour: 252 | m_ObjectHideFlags: 1 253 | m_PrefabParentObject: {fileID: 0} 254 | m_PrefabInternal: {fileID: 100100000} 255 | m_GameObject: {fileID: 1000010750167884} 256 | m_Enabled: 1 257 | m_EditorHideFlags: 0 258 | m_Script: {fileID: 11500000, guid: 7a39cd4a82b79dd4e9ce59ed0d1e5466, type: 3} 259 | m_Name: 260 | m_EditorClassIdentifier: 261 | bitmapFontXml: {fileID: 4900000, guid: 0496e0ed0af0c914e955dadac36fe312, type: 3} 262 | bitmapFontMaterial: {fileID: 2100000, guid: 43f4a1196e928b441895d3b6d3519e19, type: 2} 263 | glyphHeight: 72 264 | glyphWidth: 34 265 | quadHeightScale: 1 266 | useRexPaintFont: 1 267 | IBMGRAPH: {fileID: 4900000, guid: a3098396696b411489c43df4bc1ec83c, type: 3} 268 | rexPaintFontMaterial: {fileID: 2100000, guid: 0df989b30b3975543b39c6eca1dd18df, 269 | type: 2} 270 | rexPaintTextureSize: 960 271 | rexPaintGridSize: 16 272 | rexPaintBleed: 3 273 | rexPaintQuadHeightScale: 1.4 274 | textureSize: 0 275 | fontLoaded: 0 276 | --- !u!114 &114000013563964176 277 | MonoBehaviour: 278 | m_ObjectHideFlags: 1 279 | m_PrefabParentObject: {fileID: 0} 280 | m_PrefabInternal: {fileID: 100100000} 281 | m_GameObject: {fileID: 1000010886032980} 282 | m_Enabled: 1 283 | m_EditorHideFlags: 0 284 | m_Script: {fileID: 11500000, guid: 75dbc0f80ebb6f342a716eaadcb721c9, type: 3} 285 | m_Name: 286 | m_EditorClassIdentifier: 287 | mesh: {fileID: 0} 288 | meshVertices: [] 289 | meshUVs: [] 290 | meshColors: [] 291 | --- !u!114 &114000013610232378 292 | MonoBehaviour: 293 | m_ObjectHideFlags: 1 294 | m_PrefabParentObject: {fileID: 0} 295 | m_PrefabInternal: {fileID: 100100000} 296 | m_GameObject: {fileID: 1000010750167884} 297 | m_Enabled: 1 298 | m_EditorHideFlags: 0 299 | m_Script: {fileID: 11500000, guid: 6198a9c52e3051e489933c3ba6434896, type: 3} 300 | m_Name: 301 | m_EditorClassIdentifier: 302 | font: {fileID: 114000012485805544} 303 | mainCamera: {fileID: 20000013744435474} 304 | displayQuadPrefab: {fileID: 1000010722400042, guid: 0b25ef5045c06464facf157f0df521af, 305 | type: 2} 306 | backgroundMaterial: {fileID: 2100000, guid: 0c7e276f0922a374c902e5468ffc8ce8, type: 2} 307 | background: {fileID: 114000011961259074} 308 | foreground: {fileID: 114000013563964176} 309 | displayWidth: 80 310 | autoDisplayHeight: 1 311 | displayHeight: 0 312 | colorLerpCurve: 313 | serializedVersion: 2 314 | m_Curve: 315 | - time: 0 316 | value: 0 317 | inSlope: 3.0451128 318 | outSlope: 3.0451128 319 | tangentMode: 0 320 | - time: 1 321 | value: 1 322 | inSlope: 0 323 | outSlope: 0 324 | tangentMode: 0 325 | m_PreInfinity: 2 326 | m_PostInfinity: 2 327 | m_RotationOrder: 0 328 | initialized: 0 329 | clearColor: {r: 0, g: 0, b: 0, a: 0} 330 | --- !u!114 &114000014031879530 331 | MonoBehaviour: 332 | m_ObjectHideFlags: 1 333 | m_PrefabParentObject: {fileID: 0} 334 | m_PrefabInternal: {fileID: 100100000} 335 | m_GameObject: {fileID: 1000010861509900} 336 | m_Enabled: 1 337 | m_EditorHideFlags: 0 338 | m_Script: {fileID: 11500000, guid: ecc57b986fa74f64d90410580da2a029, type: 3} 339 | m_Name: 340 | m_EditorClassIdentifier: 341 | hideNativeCursor: 1 342 | reservedLayer: -1 343 | cursorUp: "\u2591" 344 | cursorDown: "\u2588" 345 | cursorColor: {r: 1, g: 0.2906977, b: 0.2906977, a: 1} 346 | cursorFadeTime: 0.25 347 | fadeToClear: 1 348 | -------------------------------------------------------------------------------- /Prefabs/Display/PhiOS_Bootstrap.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb2b76d237bfd1b4fb72bf6e0921a647 3 | timeCreated: 1477926763 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Prefabs/Examples/Scene_Example.prefab: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!1001 &100100000 4 | Prefab: 5 | m_ObjectHideFlags: 1 6 | serializedVersion: 2 7 | m_Modification: 8 | m_TransformParent: {fileID: 0} 9 | m_Modifications: [] 10 | m_RemovedComponents: [] 11 | m_ParentPrefab: {fileID: 0} 12 | m_RootGameObject: {fileID: 1000012446161554} 13 | m_IsPrefabParent: 1 14 | --- !u!1 &1000012446161554 15 | GameObject: 16 | m_ObjectHideFlags: 0 17 | m_PrefabParentObject: {fileID: 0} 18 | m_PrefabInternal: {fileID: 100100000} 19 | serializedVersion: 4 20 | m_Component: 21 | - 4: {fileID: 4000013509843932} 22 | - 114: {fileID: 114000014213591006} 23 | m_Layer: 0 24 | m_Name: Scene_Example 25 | m_TagString: Untagged 26 | m_Icon: {fileID: 0} 27 | m_NavMeshLayer: 0 28 | m_StaticEditorFlags: 0 29 | m_IsActive: 1 30 | --- !u!4 &4000013509843932 31 | Transform: 32 | m_ObjectHideFlags: 1 33 | m_PrefabParentObject: {fileID: 0} 34 | m_PrefabInternal: {fileID: 100100000} 35 | m_GameObject: {fileID: 1000012446161554} 36 | m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} 37 | m_LocalPosition: {x: 0, y: 0, z: 0} 38 | m_LocalScale: {x: 1, y: 1, z: 1} 39 | m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} 40 | m_Children: [] 41 | m_Father: {fileID: 0} 42 | m_RootOrder: 0 43 | --- !u!114 &114000014213591006 44 | MonoBehaviour: 45 | m_ObjectHideFlags: 1 46 | m_PrefabParentObject: {fileID: 0} 47 | m_PrefabInternal: {fileID: 100100000} 48 | m_GameObject: {fileID: 1000012446161554} 49 | m_Enabled: 1 50 | m_EditorHideFlags: 0 51 | m_Script: {fileID: 11500000, guid: 27da523a3cc72864ea278d28007c33c1, type: 3} 52 | m_Name: 53 | m_EditorClassIdentifier: 54 | -------------------------------------------------------------------------------- /Prefabs/Examples/Scene_Example.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 459142d09b08fdc468bbbd79273d6973 3 | timeCreated: 1480426127 4 | licenseType: Pro 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PhiOS (ASCII Rendering Engine for Unity) 2 | ![Sample GIF](https://github.com/codyjb/PhiOS/blob/master/Documentation/ezgif-4-5ea6d2a713.gif) 3 | 4 | I am _not_ the original creator of this Library. 5 | 6 | Pasting to GitHub for Visibility and Maintainability. 7 | 8 | Refer to license details 9 | 10 | *** 11 | [Usage Details](https://github.com/codyjb/PhiOS/wiki) 12 | 13 | [Latest Release](https://github.com/codyjb/PhiOS/releases/latest) 14 | *** 15 | 16 | This is the first (base) version of PhiOS, which provides cell rendering, cell stacking/layers, 17 | foreground & background colors, cell transition animations, bitmap font support & rudimentary mouse input. 18 | 19 | The layered windowing system and scrollable UI widgets are not included in this release (yet). 20 | All that stuff will be in future extended versions. SOON™ 21 | 22 | Note: PhiOS does NOT include any post-processing image effects (all that fancy stuff like scanlines, 23 | bloom, CRT monitor distortion, glitches etc... that you may have seen on previous screenshots). 24 | These are all provided by third party plugins, please see the Third Party Effects section below 25 | if you want to replicate your display to look like this. 26 | 27 | Disclaimer: There will probably be bugs and incomplete/missing features! This engine was always intended 28 | to be part of a larger game project, and not as a tool released to the public. However, I'm putting it 29 | out there anyway due to popular request. Code is provided as-is. 30 | 31 | 32 | *** 33 | AUTHOR: [phi6](https://twitter.com/phi6) 34 | 35 | LICENSE: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) 36 | *** 37 | -------------------------------------------------------------------------------- /Scenes/ExampleScene.unity: -------------------------------------------------------------------------------- 1 | %YAML 1.1 2 | %TAG !u! tag:unity3d.com,2011: 3 | --- !u!29 &1 4 | SceneSettings: 5 | m_ObjectHideFlags: 0 6 | m_PVSData: 7 | m_PVSObjectsArray: [] 8 | m_PVSPortalsArray: [] 9 | m_OcclusionBakeSettings: 10 | smallestOccluder: 5 11 | smallestHole: 0.25 12 | backfaceThreshold: 100 13 | --- !u!104 &2 14 | RenderSettings: 15 | m_ObjectHideFlags: 0 16 | serializedVersion: 7 17 | m_Fog: 0 18 | m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} 19 | m_FogMode: 3 20 | m_FogDensity: 0.01 21 | m_LinearFogStart: 0 22 | m_LinearFogEnd: 300 23 | m_AmbientSkyColor: {r: 0, g: 0, b: 0, a: 1} 24 | m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} 25 | m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} 26 | m_AmbientIntensity: 1 27 | m_AmbientMode: 3 28 | m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0} 29 | m_HaloStrength: 0.5 30 | m_FlareStrength: 1 31 | m_FlareFadeSpeed: 3 32 | m_HaloTexture: {fileID: 0} 33 | m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} 34 | m_DefaultReflectionMode: 0 35 | m_DefaultReflectionResolution: 128 36 | m_ReflectionBounces: 1 37 | m_ReflectionIntensity: 1 38 | m_CustomReflection: {fileID: 0} 39 | m_Sun: {fileID: 0} 40 | m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} 41 | --- !u!157 &3 42 | LightmapSettings: 43 | m_ObjectHideFlags: 0 44 | serializedVersion: 7 45 | m_GIWorkflowMode: 1 46 | m_GISettings: 47 | serializedVersion: 2 48 | m_BounceScale: 1 49 | m_IndirectOutputScale: 1 50 | m_AlbedoBoost: 1 51 | m_TemporalCoherenceThreshold: 1 52 | m_EnvironmentLightingMode: 0 53 | m_EnableBakedLightmaps: 1 54 | m_EnableRealtimeLightmaps: 1 55 | m_LightmapEditorSettings: 56 | serializedVersion: 4 57 | m_Resolution: 2 58 | m_BakeResolution: 40 59 | m_TextureWidth: 1024 60 | m_TextureHeight: 1024 61 | m_AO: 0 62 | m_AOMaxDistance: 1 63 | m_CompAOExponent: 1 64 | m_CompAOExponentDirect: 0 65 | m_Padding: 2 66 | m_LightmapParameters: {fileID: 0} 67 | m_LightmapsBakeMode: 1 68 | m_TextureCompression: 1 69 | m_DirectLightInLightProbes: 1 70 | m_FinalGather: 0 71 | m_FinalGatherFiltering: 1 72 | m_FinalGatherRayCount: 256 73 | m_ReflectionCompression: 2 74 | m_LightingDataAsset: {fileID: 0} 75 | m_RuntimeCPUUsage: 25 76 | --- !u!196 &4 77 | NavMeshSettings: 78 | serializedVersion: 2 79 | m_ObjectHideFlags: 0 80 | m_BuildSettings: 81 | serializedVersion: 2 82 | agentRadius: 0.5 83 | agentHeight: 2 84 | agentSlope: 45 85 | agentClimb: 0.4 86 | ledgeDropHeight: 0 87 | maxJumpAcrossDistance: 0 88 | accuratePlacement: 0 89 | minRegionArea: 2 90 | cellSize: 0.16666667 91 | manualCellSize: 0 92 | m_NavMeshData: {fileID: 0} 93 | --- !u!1001 &258634425 94 | Prefab: 95 | m_ObjectHideFlags: 0 96 | serializedVersion: 2 97 | m_Modification: 98 | m_TransformParent: {fileID: 0} 99 | m_Modifications: 100 | - target: {fileID: 4000013509843932, guid: 459142d09b08fdc468bbbd79273d6973, type: 2} 101 | propertyPath: m_LocalPosition.x 102 | value: 0 103 | objectReference: {fileID: 0} 104 | - target: {fileID: 4000013509843932, guid: 459142d09b08fdc468bbbd79273d6973, type: 2} 105 | propertyPath: m_LocalPosition.y 106 | value: 0 107 | objectReference: {fileID: 0} 108 | - target: {fileID: 4000013509843932, guid: 459142d09b08fdc468bbbd79273d6973, type: 2} 109 | propertyPath: m_LocalPosition.z 110 | value: 0 111 | objectReference: {fileID: 0} 112 | - target: {fileID: 4000013509843932, guid: 459142d09b08fdc468bbbd79273d6973, type: 2} 113 | propertyPath: m_LocalRotation.x 114 | value: 0 115 | objectReference: {fileID: 0} 116 | - target: {fileID: 4000013509843932, guid: 459142d09b08fdc468bbbd79273d6973, type: 2} 117 | propertyPath: m_LocalRotation.y 118 | value: 0 119 | objectReference: {fileID: 0} 120 | - target: {fileID: 4000013509843932, guid: 459142d09b08fdc468bbbd79273d6973, type: 2} 121 | propertyPath: m_LocalRotation.z 122 | value: 0 123 | objectReference: {fileID: 0} 124 | - target: {fileID: 4000013509843932, guid: 459142d09b08fdc468bbbd79273d6973, type: 2} 125 | propertyPath: m_LocalRotation.w 126 | value: 1 127 | objectReference: {fileID: 0} 128 | - target: {fileID: 4000013509843932, guid: 459142d09b08fdc468bbbd79273d6973, type: 2} 129 | propertyPath: m_RootOrder 130 | value: 1 131 | objectReference: {fileID: 0} 132 | m_RemovedComponents: [] 133 | m_ParentPrefab: {fileID: 100100000, guid: 459142d09b08fdc468bbbd79273d6973, type: 2} 134 | m_IsPrefabParent: 0 135 | --- !u!1001 &917864690 136 | Prefab: 137 | m_ObjectHideFlags: 0 138 | serializedVersion: 2 139 | m_Modification: 140 | m_TransformParent: {fileID: 0} 141 | m_Modifications: 142 | - target: {fileID: 4000010040037034, guid: cb2b76d237bfd1b4fb72bf6e0921a647, type: 2} 143 | propertyPath: m_LocalPosition.x 144 | value: 0 145 | objectReference: {fileID: 0} 146 | - target: {fileID: 4000010040037034, guid: cb2b76d237bfd1b4fb72bf6e0921a647, type: 2} 147 | propertyPath: m_LocalPosition.y 148 | value: 0 149 | objectReference: {fileID: 0} 150 | - target: {fileID: 4000010040037034, guid: cb2b76d237bfd1b4fb72bf6e0921a647, type: 2} 151 | propertyPath: m_LocalPosition.z 152 | value: 0 153 | objectReference: {fileID: 0} 154 | - target: {fileID: 4000010040037034, guid: cb2b76d237bfd1b4fb72bf6e0921a647, type: 2} 155 | propertyPath: m_LocalRotation.x 156 | value: 0 157 | objectReference: {fileID: 0} 158 | - target: {fileID: 4000010040037034, guid: cb2b76d237bfd1b4fb72bf6e0921a647, type: 2} 159 | propertyPath: m_LocalRotation.y 160 | value: 0 161 | objectReference: {fileID: 0} 162 | - target: {fileID: 4000010040037034, guid: cb2b76d237bfd1b4fb72bf6e0921a647, type: 2} 163 | propertyPath: m_LocalRotation.z 164 | value: 0 165 | objectReference: {fileID: 0} 166 | - target: {fileID: 4000010040037034, guid: cb2b76d237bfd1b4fb72bf6e0921a647, type: 2} 167 | propertyPath: m_LocalRotation.w 168 | value: 1 169 | objectReference: {fileID: 0} 170 | - target: {fileID: 4000010040037034, guid: cb2b76d237bfd1b4fb72bf6e0921a647, type: 2} 171 | propertyPath: m_RootOrder 172 | value: 0 173 | objectReference: {fileID: 0} 174 | m_RemovedComponents: [] 175 | m_ParentPrefab: {fileID: 100100000, guid: cb2b76d237bfd1b4fb72bf6e0921a647, type: 2} 176 | m_IsPrefabParent: 0 177 | -------------------------------------------------------------------------------- /Scenes/ExampleScene.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1aa351cfd92f8b741a87c3f1b4897237 3 | timeCreated: 1477216642 4 | licenseType: Pro 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Scripts/Examples/Example.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class Example : MonoBehaviour, IClickAction, IHoverAction { 5 | 6 | public IEnumerator Start(){ 7 | 8 | // wait until display has initialized 9 | while (!Display.IsInitialized()) { 10 | yield return null; 11 | } 12 | 13 | // output red hello world at 10,5 on layer 0 14 | string helloWorld = "Hello World!"; 15 | for (int x = 0; x < helloWorld.Length; x++) { 16 | Cell cell = Display.CellAt(0, 10 + x, 5); 17 | cell.SetContent( 18 | helloWorld.Substring(x, 1), 19 | Color.clear, 20 | Color.red); 21 | } 22 | 23 | // output red hello world at 10,7 with green background on layer 0 24 | for (int x = 0; x < helloWorld.Length; x++) { 25 | Cell cell = Display.CellAt(0, 10 + x, 7); 26 | cell.SetContent( 27 | helloWorld.Substring(x, 1), 28 | Color.green, 29 | Color.red); 30 | } 31 | 32 | // output blue instruction at 0,10 with black background on layer 2 33 | string instruction = "Click to clear layer 1"; 34 | for (int x = 0; x < instruction.Length; x++) { 35 | Cell cell = Display.CellAt(2, x, 10); 36 | cell.SetContent( 37 | instruction.Substring(x, 1), 38 | Color.black, 39 | Color.blue); 40 | } 41 | 42 | // add clickable cell text on layer 2 43 | string clickableText = "Click->"; 44 | for (int x = 0; x < clickableText.Length; x++) { 45 | Cell cell = Display.CellAt(2, x, 17); 46 | cell.SetContent( 47 | clickableText.Substring(x, 1), 48 | Color.clear, 49 | Color.yellow); 50 | } 51 | 52 | // add clickable cell on layer 3 53 | Cell clickable = Display.CellAt(3, 7, 17); 54 | clickable.SetContent( 55 | "?", 56 | Color.black, 57 | Color.yellow); 58 | clickable.clickAction = this; 59 | clickable.hoverAction = this; 60 | 61 | StartCoroutine(RandomGrid()); 62 | StartCoroutine(Transition()); 63 | } 64 | 65 | public void Update(){ 66 | 67 | // clear every cell on layer 1 with mouse click 68 | if (Input.GetMouseButtonDown(0)) { 69 | for (int x = 0; x < Display.GetDisplayWidth(); x++) { 70 | for (int y = 0; y < Display.GetDisplayHeight(); y++) { 71 | Cell cell = Display.CellAt(1, x, y); 72 | cell.Clear(); 73 | } 74 | } 75 | } 76 | } 77 | 78 | public IEnumerator RandomGrid(){ 79 | 80 | // fill random cells every frame on layer 1 81 | while (Application.isPlaying) { 82 | for (int i = 0; i < 50; i++) { 83 | Cell cell = Display.CellAt( 84 | 1, 85 | Random.Range(17, Display.GetDisplayWidth()), 86 | Random.Range(0, Display.GetDisplayHeight())); 87 | 88 | // random color and alpha 89 | Color color = Color.Lerp(Color.yellow, Color.green, Random.Range(0f, 1f)); 90 | color = new Color(color.r, color.g, color.b, Random.Range(0f, 1f)); 91 | 92 | cell.SetContent( 93 | Random.Range(0, 10) + "", 94 | Color.clear, 95 | color); 96 | } 97 | 98 | yield return null; 99 | } 100 | } 101 | 102 | public IEnumerator Transition(){ 103 | 104 | // repeat transition animation 105 | while (Application.isPlaying) { 106 | 107 | // output white text at 0,15 on layer 2 with fade transition 108 | string text = "Transition Animation"; 109 | for (int x = 0; x < text.Length; x++) { 110 | Cell cell = Display.CellAt(2, x, 15); 111 | cell.SetContent( 112 | text.Substring(x, 1), 113 | Color.clear, 114 | Color.white, 115 | 0.5f, 116 | Color.white); 117 | } 118 | 119 | // clear text after a while with red fade transition 120 | yield return new WaitForSeconds(0.75f); 121 | for (int x = 0; x < text.Length; x++) { 122 | Cell cell = Display.CellAt(2, x, 15); 123 | cell.Clear( 124 | 0.5f, 125 | Color.red); 126 | } 127 | 128 | yield return new WaitForSeconds(0.75f); 129 | } 130 | } 131 | 132 | #region IClickAction implementation 133 | 134 | public void OnMouseDown() 135 | { 136 | // show clicked text 137 | string clicked = "You Clicked!"; 138 | for (int x = 0; x < clicked.Length; x++) { 139 | Cell cell = Display.CellAt(2, x, 19); 140 | cell.SetContent( 141 | clicked.Substring(x, 1), 142 | Color.clear, 143 | Color.red); 144 | } 145 | } 146 | 147 | #endregion 148 | 149 | #region IHoverAction implementation 150 | 151 | public void OnHoverEnter() 152 | { 153 | // show hover text 154 | string hover = "You Hovered!"; 155 | for (int x = 0; x < hover.Length; x++) { 156 | Cell cell = Display.CellAt(2, x, 18); 157 | cell.SetContent( 158 | hover.Substring(x, 1), 159 | Color.clear, 160 | Color.white); 161 | } 162 | } 163 | 164 | public void OnHoverExit() 165 | { 166 | } 167 | 168 | #endregion 169 | } 170 | -------------------------------------------------------------------------------- /Scripts/Examples/Example.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27da523a3cc72864ea278d28007c33c1 3 | timeCreated: 1480095333 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Actions.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c813f364bd11c71429e61684ce41f108 3 | folderAsset: yes 4 | timeCreated: 1478648986 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Actions/IClickAction.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public interface IClickAction { 5 | void OnMouseDown(); 6 | } 7 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Actions/IClickAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 82b143fd14268a1489799b40e96b89e0 3 | timeCreated: 1478128439 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Actions/IDragAction.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public interface IDragAction { 5 | void OnDragStart(); 6 | void OnDragDelta (Vector2 delta); 7 | } 8 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Actions/IDragAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b89c4a67f6ab96446a6b2f432d2c523b 3 | timeCreated: 1478131871 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Actions/IHoverAction.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public interface IHoverAction { 5 | void OnHoverEnter(); 6 | void OnHoverExit(); 7 | } 8 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Actions/IHoverAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4758c031383b93f46b4a44ab673acfe2 3 | timeCreated: 1478127086 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Actions/IScrollAction.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public interface IScrollAction { 5 | void OnScrollDelta (int delta); 6 | } 7 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Actions/IScrollAction.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 52fb6e6beea733b48b3f3b8f4b7067e7 3 | timeCreated: 1478131871 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/BitmapFont.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Xml; 5 | using System.IO; 6 | using System.Text; 7 | using System; 8 | 9 | public class BitmapFont : MonoBehaviour { 10 | 11 | [Header("BMFont")] 12 | public TextAsset bitmapFontXml; 13 | public Material bitmapFontMaterial; 14 | public float glyphHeight; 15 | public float glyphWidth; 16 | public float quadHeightScale; 17 | 18 | [Header("REXPaint CP437")] 19 | public bool useRexPaintFont = false; 20 | public TextAsset IBMGRAPH; 21 | public Material rexPaintFontMaterial; 22 | public float rexPaintTextureSize; 23 | public int rexPaintGridSize; 24 | public float rexPaintBleed; 25 | public float rexPaintQuadHeightScale; 26 | 27 | private float rexPaintGlyphSize; 28 | 29 | [HideInInspector] 30 | public float textureSize; 31 | 32 | [HideInInspector] 33 | public bool fontLoaded = false; 34 | 35 | private Dictionary glyphs = new Dictionary(); 36 | 37 | public void Awake(){ 38 | 39 | // parse font xml 40 | if (!useRexPaintFont) { 41 | string fontXmlText = bitmapFontXml.text; 42 | XmlReader reader = XmlReader.Create(new StringReader(fontXmlText)); 43 | while (reader.Read()) { 44 | 45 | // parse texture size 46 | if (reader.LocalName == "common") { 47 | textureSize = float.Parse(reader.GetAttribute("scaleW")); 48 | } 49 | 50 | // parse glyph 51 | else if (reader.LocalName == "char") { 52 | string glyphString = char.ConvertFromUtf32(int.Parse(reader.GetAttribute("id"))); 53 | 54 | // new glyph 55 | if (!glyphs.ContainsKey(glyphString)) { 56 | BitmapFontGlyph glyph = new BitmapFontGlyph(); 57 | glyph.glyphString = glyphString; 58 | glyph.x = float.Parse(reader.GetAttribute("x")); 59 | glyph.y = float.Parse(reader.GetAttribute("y")); 60 | glyph.xOffset = float.Parse(reader.GetAttribute("xoffset")); 61 | glyph.yOffset = float.Parse(reader.GetAttribute("yoffset")); 62 | glyph.width = float.Parse(reader.GetAttribute("width")); 63 | glyph.height = float.Parse(reader.GetAttribute("height")); 64 | glyphs.Add(glyphString, glyph); 65 | glyph.RecalculateGlyphMetrics(glyphWidth, glyphHeight, textureSize, 0f); 66 | } 67 | } 68 | } 69 | } 70 | 71 | // use REXPaint font instead 72 | else { 73 | 74 | // get ibmgraph mapping 75 | Dictionary ibmGraphMapping = BitmapFont.GetIBMGRAPHMapping(IBMGRAPH); 76 | 77 | // set glyph size 78 | rexPaintGlyphSize = rexPaintTextureSize / (float) rexPaintGridSize; 79 | 80 | // set texture size 81 | textureSize = rexPaintTextureSize; 82 | 83 | // add glyphs 84 | for (int y = 0; y < rexPaintGridSize; y++) { 85 | for (int x = 0; x < rexPaintGridSize; x++) { 86 | 87 | string glyphString = CP437ToUnicode(Mathf.RoundToInt(y * rexPaintGridSize + x), ibmGraphMapping); 88 | 89 | // new glyph 90 | if (!glyphs.ContainsKey(glyphString)) { 91 | BitmapFontGlyph glyph = new BitmapFontGlyph(); 92 | glyph.glyphString = glyphString; 93 | glyph.x = x * rexPaintGlyphSize; 94 | glyph.y = y * rexPaintGlyphSize; 95 | glyph.xOffset = 0f; 96 | glyph.yOffset = 0f; 97 | glyph.width = rexPaintGlyphSize; 98 | glyph.height = rexPaintGlyphSize; 99 | glyphs.Add(glyph.glyphString, glyph); 100 | glyph.RecalculateGlyphMetrics( 101 | rexPaintGlyphSize, 102 | rexPaintGlyphSize, 103 | textureSize, 104 | rexPaintBleed); 105 | } 106 | } 107 | } 108 | } 109 | 110 | // finished loading font 111 | fontLoaded = true; 112 | Debug.Log("FONT TEXTURE SIZE: " + textureSize); 113 | Debug.Log(glyphs.Count + " GLYPHS LOADED!"); 114 | } 115 | 116 | public Material GetFontMaterial(){ 117 | return useRexPaintFont ? rexPaintFontMaterial : bitmapFontMaterial; 118 | } 119 | 120 | public float GetGlyphWidth(){ 121 | return useRexPaintFont ? rexPaintGlyphSize : glyphWidth; 122 | } 123 | 124 | public float GetGlyphHeight(){ 125 | return useRexPaintFont ? rexPaintGlyphSize : glyphHeight; 126 | } 127 | 128 | public BitmapFontGlyph GetGlyph(string glyphString){ 129 | BitmapFontGlyph glyph; 130 | 131 | // return specified glyph 132 | if (glyphs.TryGetValue(glyphString, out glyph)) { 133 | return glyph; 134 | } 135 | 136 | // glyph not found 137 | else { 138 | return glyphs["?"]; 139 | } 140 | } 141 | 142 | public static Dictionary GetIBMGRAPHMapping(TextAsset IBMGRAPH){ 143 | 144 | // parse ibmgraph mapping 145 | Dictionary ibmGraphMapping = new Dictionary(); 146 | string[] lines = IBMGRAPH.ToString().Split('\n'); 147 | foreach (string line in lines) { 148 | 149 | // skip comment line 150 | if (!line.StartsWith("#") && line.Trim().Length > 0) { 151 | 152 | // spilt columns 153 | string[] tabs = line.Split(' '); 154 | int cp437 = Convert.ToInt32(tabs[1], 16); 155 | int unicode = Convert.ToInt32(tabs[0], 16); 156 | ibmGraphMapping.Add(cp437, unicode); 157 | } 158 | } 159 | 160 | return ibmGraphMapping; 161 | } 162 | 163 | public static string CP437ToUnicode(int asciiCode, Dictionary ibmGraphMapping){ 164 | 165 | string character = ""; 166 | 167 | // null character 168 | if (asciiCode == 0) { 169 | character = " "; 170 | } 171 | 172 | // get character using codepage 437 encoding 173 | else if (!ibmGraphMapping.ContainsKey(asciiCode)) { 174 | character = Encoding.GetEncoding(437).GetString(new byte[]{ (byte)asciiCode }); 175 | } 176 | 177 | // get character using ibmgraph mapping 178 | else { 179 | character = char.ConvertFromUtf32(ibmGraphMapping[asciiCode]); 180 | } 181 | 182 | return character; 183 | } 184 | } 185 | -------------------------------------------------------------------------------- /Scripts/PhiOS/BitmapFont.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a39cd4a82b79dd4e9ce59ed0d1e5466 3 | timeCreated: 1479377472 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/BitmapFontGlyph.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class BitmapFontGlyph { 5 | 6 | public string glyphString; 7 | public float x; 8 | public float y; 9 | public float xOffset; 10 | public float yOffset; 11 | public float width; 12 | public float height; 13 | public Vector3[] vertices = new Vector3[4]; 14 | public Vector2[] uvs = new Vector2[4]; 15 | 16 | public void RecalculateGlyphMetrics(float glyphWidth, float glyphHeight, float textureSize, float bleed){ 17 | 18 | // calculate glyph vertices 19 | vertices[0] = new Vector3(0f + xOffset / glyphWidth, 0f + yOffset / glyphHeight, 0f); 20 | vertices[1] = new Vector3(1f * (width / glyphWidth) + xOffset / glyphWidth, 1f * (height / glyphHeight) + yOffset / glyphHeight, 0f); 21 | vertices[2] = new Vector3(1f * (width / glyphWidth) + xOffset / glyphWidth, 0f + yOffset / glyphHeight, 0f); 22 | vertices[3] = new Vector3(0f + xOffset / glyphWidth, 1f * (height / glyphHeight) + yOffset / glyphHeight, 0f); 23 | 24 | // calculate glyph uvs 25 | uvs[0] = new Vector2((x / textureSize) + (bleed / textureSize), ((textureSize - (y + height)) / textureSize) + (bleed / textureSize)); 26 | uvs[1] = new Vector2(((x + width) / textureSize) - (bleed / textureSize), ((textureSize - y) / textureSize) - (bleed / textureSize)); 27 | uvs[2] = new Vector2(((x + width) / textureSize) - (bleed / textureSize), ((textureSize - (y + height)) / textureSize) + (bleed / textureSize)); 28 | uvs[3] = new Vector2((x / textureSize) + (bleed / textureSize), ((textureSize - y) / textureSize) - (bleed / textureSize)); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Scripts/PhiOS/BitmapFontGlyph.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 98ad0b7a4eba4e9428cd191867b03625 3 | timeCreated: 1479377472 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Cell.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class CellFades { 5 | public static string DEFAULT_REVERSE = "░▒▓█"; 6 | public static string DEFAULT = "█▓▒░"; 7 | } 8 | 9 | public class Cell { 10 | 11 | public int layer; 12 | public Vector2 position; 13 | public MonoBehaviour owner; 14 | public string content = ""; 15 | public Color backgroundColor; 16 | public Color color; 17 | public IHoverAction hoverAction; 18 | public IClickAction clickAction; 19 | public IDragAction dragAction; 20 | public IScrollAction scrollAction; 21 | 22 | private string targetContent = ""; 23 | private Color targetColor; 24 | private float fadeLeft = 0f; 25 | private float fadeMax = 0f; 26 | private Color fadeColor; 27 | private string fades = ""; 28 | private bool fadeFinished = true; 29 | 30 | public void Clear(){ 31 | SetContent("", Color.clear, Color.clear); 32 | } 33 | 34 | public void Clear(float fadeTime, Color fadeColor){ 35 | SetContent("", Color.clear, Color.clear, fadeTime, fadeColor, CellFades.DEFAULT_REVERSE); 36 | } 37 | 38 | public void SetContent(string content, Color backgroundColor, Color color){ 39 | SetContent(content, backgroundColor, color, 0f, color, ""); 40 | } 41 | 42 | public void SetContent(string content, Color backgroundColor, Color color, float fadeTime, Color fadeColor){ 43 | SetContent(content, backgroundColor, color, fadeTime, fadeColor, CellFades.DEFAULT); 44 | } 45 | 46 | public void SetContent( 47 | string content, 48 | Color backgroundColor, 49 | Color color, 50 | float fadeMax, 51 | Color fadeColor, 52 | string fades){ 53 | 54 | // set target content and color 55 | targetContent = content; 56 | this.backgroundColor = backgroundColor; 57 | targetColor = color; 58 | 59 | // fade 60 | if (fadeMax > 0f) { 61 | this.fadeLeft = this.fadeMax = Random.Range (0f, fadeMax); 62 | this.color = this.fadeColor = fadeColor; 63 | this.fades = fades; 64 | fadeFinished = false; 65 | } 66 | 67 | // instant 68 | else { 69 | this.fadeLeft = 0f; 70 | this.fadeMax = 0f; 71 | fadeFinished = false; 72 | } 73 | 74 | // add cell to top layer 75 | if (targetContent != "") { 76 | Display.GET.AddCellAsTopLayer(this); 77 | } 78 | } 79 | 80 | public void Update(){ 81 | 82 | // display initialized 83 | if (Display.GET.initialized) { 84 | 85 | // fade 86 | if (fadeLeft > 0f) { 87 | content = targetContent.Trim().Length > 0 || content.Trim().Length > 0 ? 88 | fades.Substring(Mathf.RoundToInt((fadeLeft / fadeMax) * (fades.Length - 1)), 1) : 89 | targetContent; 90 | color = Color.Lerp( 91 | targetColor, 92 | fadeColor, 93 | Display.GET.colorLerpCurve.Evaluate(fadeLeft / fadeMax)); 94 | fadeLeft -= Time.deltaTime; 95 | } 96 | 97 | // fade finished 98 | else { 99 | 100 | // remove cell from top layer 101 | if (!fadeFinished && targetContent == "") { 102 | Display.GET.RemoveCellAsTopLayer(this); 103 | } 104 | 105 | fadeFinished = true; 106 | fadeLeft = 0f; 107 | content = targetContent; 108 | color = targetColor; 109 | } 110 | } 111 | } 112 | } 113 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Cell.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 67f1f9e707f61ea4885cc6e3af151932 3 | timeCreated: 1477240057 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Display.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEngine.UI; 3 | using System.Collections; 4 | using System.Collections.Generic; 5 | 6 | public class Display : MonoBehaviour { 7 | 8 | public static Display GET; 9 | 10 | [Header("COMPONENTS")] 11 | public BitmapFont font; 12 | public Camera mainCamera; 13 | public GameObject displayQuadPrefab; 14 | public Material backgroundMaterial; 15 | public DisplayMesh background; 16 | public DisplayMesh foreground; 17 | 18 | [Header("SIZE")] 19 | public int displayWidth = 80; 20 | public bool autoDisplayHeight = true; 21 | public int displayHeight; 22 | 23 | [Header("TRANSITIONS")] 24 | public AnimationCurve colorLerpCurve; 25 | 26 | [HideInInspector] 27 | public bool initialized = false; 28 | 29 | [HideInInspector] 30 | public Color clearColor; 31 | 32 | private float quadWidth; 33 | private float quadHeight; 34 | private int reservedLayers = 1; 35 | private int initialNumLayers = 3; 36 | private int numLayers = 0; 37 | private Dictionary cells = new Dictionary(); 38 | private LinkedList cellList = new LinkedList(); 39 | private LinkedList[,] topLayers; 40 | private Vector3 zero3 = Vector3.zero; 41 | private Vector2 zero2 = Vector2.zero; 42 | 43 | public void Awake(){ 44 | GET = this; 45 | 46 | // cache clear color 47 | clearColor = Color.clear; 48 | } 49 | 50 | public IEnumerator Start(){ 51 | 52 | // wait until font has loaded 53 | while (!font.fontLoaded) { 54 | yield return null; 55 | } 56 | 57 | // calculate quad size 58 | quadWidth = 1f; 59 | quadHeight = 60 | (font.GetGlyphHeight() / font.GetGlyphWidth()) * 61 | (font.useRexPaintFont ? font.rexPaintQuadHeightScale : font.quadHeightScale); 62 | 63 | // derive displayheight from desired display width 64 | int maxDisplayHeight = Mathf.RoundToInt((((float)Screen.height / (float)Screen.width) * (float)displayWidth) / quadHeight); 65 | if (autoDisplayHeight) { 66 | displayHeight = maxDisplayHeight; 67 | } 68 | 69 | // instantiate quads 70 | int quadMeshFilterIndex = 0; 71 | MeshFilter[] quadMeshFilters = new MeshFilter[displayWidth * displayHeight]; 72 | for (int y = 0; y < displayHeight; y++) { 73 | for (int x = 0; x < displayWidth; x++) { 74 | 75 | // instantiate from prefab 76 | GameObject quad = (GameObject) GameObject.Instantiate(displayQuadPrefab); 77 | quad.transform.parent = transform; 78 | quad.transform.localScale = new Vector3(quadWidth, quadHeight, 1f); 79 | quad.transform.position = new Vector3(x * quadWidth + quadWidth * 0.5f, -y * quadHeight - quadHeight * 0.5f, 0f); 80 | 81 | // add to array for combining later 82 | quadMeshFilters[quadMeshFilterIndex] = quad.GetComponent(); 83 | quadMeshFilterIndex++; 84 | } 85 | } 86 | 87 | // add quads to combine instances 88 | CombineInstance[] combineInstances = new CombineInstance[quadMeshFilters.Length]; 89 | for (int i = 0; i < quadMeshFilters.Length; i++) { 90 | combineInstances[i].mesh = quadMeshFilters[i].sharedMesh; 91 | combineInstances[i].transform = quadMeshFilters[i].transform.localToWorldMatrix; 92 | } 93 | 94 | // combine quads to foreground and background 95 | background.CombineQuads(combineInstances, "background_quads", backgroundMaterial, 0.001f); 96 | foreground.CombineQuads(combineInstances, "foreground_quads", font.GetFontMaterial(), 0f); 97 | 98 | // update camera orthographic size 99 | mainCamera.orthographicSize = Mathf.Max(maxDisplayHeight * quadHeight * 0.5f, background.transform.position.y); 100 | 101 | yield return null; 102 | 103 | // destroy original quads 104 | for (int i = quadMeshFilters.Length - 1; i >= 0; i--) { 105 | GameObject.Destroy(quadMeshFilters[i].gameObject); 106 | } 107 | quadMeshFilters = null; 108 | 109 | Debug.Log ("DISPLAY SIZE: " + displayWidth + "x" + displayHeight); 110 | 111 | // pre-populate top layers 112 | topLayers = new LinkedList[displayWidth, displayHeight]; 113 | for (int y = 0; y < displayHeight; y++) { 114 | for (int x = 0; x < displayWidth; x++) { 115 | topLayers[x,y] = new LinkedList(); 116 | } 117 | } 118 | 119 | // pre-populate layers 120 | for (int layerIndex = -reservedLayers; layerIndex < initialNumLayers; layerIndex++) { 121 | Cell[,] layer = new Cell[displayWidth, displayHeight]; 122 | for (int y = 0; y < displayHeight; y++) { 123 | for (int x = 0; x < displayWidth; x++) { 124 | layer[x, y] = CreateCell(layerIndex, x, y); 125 | } 126 | } 127 | cells.Add (layerIndex, layer); 128 | } 129 | numLayers = initialNumLayers; 130 | 131 | yield return null; 132 | 133 | // initialized 134 | initialized = true; 135 | } 136 | 137 | private Cell CreateCell(int layerIndex, int x, int y){ 138 | 139 | // create a new cell at layer and position 140 | Cell cell = new Cell(); 141 | cell.layer = layerIndex; 142 | cell.position = new Vector2 (x, y); 143 | cellList.AddLast(cell); 144 | return cell; 145 | } 146 | 147 | public int GetNumLayers(){ 148 | if (initialized) { 149 | return numLayers; 150 | } else { 151 | throw new UnityException("Display not yet initialized!"); 152 | } 153 | } 154 | 155 | public Cell GetCell(int layer, float x, float y){ 156 | 157 | if (initialized) { 158 | 159 | // get layer cells, add if not already exists 160 | Cell[,] layerCells = null; 161 | if (!cells.TryGetValue(layer, out layerCells)) { 162 | layerCells = new Cell[displayWidth, displayHeight]; 163 | cells.Add(layer, layerCells); 164 | numLayers = Mathf.Max(layer + 1, numLayers); 165 | } 166 | 167 | // get cell, add if not already exists 168 | if (x >=0 && y >= 0 && x < displayWidth && y < displayHeight) { 169 | Cell cell = layerCells[(int)x, (int)y]; 170 | if (cell == null) { 171 | cell = layerCells[(int)x, (int)y] = CreateCell(layer, (int)x, (int)y); 172 | } 173 | 174 | return cell; 175 | } 176 | 177 | // position outside of display bounds 178 | else { 179 | return null; 180 | } 181 | 182 | } else { 183 | throw new UnityException("Display not yet initialized!"); 184 | } 185 | } 186 | 187 | public void AddCellAsTopLayer(Cell c){ 188 | 189 | if (initialized) { 190 | 191 | // get top layers for cell 192 | LinkedList topLayersForCell = topLayers[(int)c.position.x, (int)c.position.y]; 193 | 194 | // add layer to end 195 | if (topLayersForCell.Count == 0 || 196 | (topLayersForCell.Last.Value >= 0 && topLayersForCell.Last.Value < c.layer) || 197 | (topLayersForCell.Last.Value >= 0 && c.layer < 0) || 198 | (topLayersForCell.Last.Value < 0 && c.layer < 0 && c.layer < topLayersForCell.Last.Value)) { 199 | topLayersForCell.AddLast(c.layer); 200 | return; 201 | } 202 | 203 | // add layer to beginning 204 | else if ( 205 | (topLayersForCell.First.Value >= 0 && c.layer >= 0 && topLayersForCell.First.Value > c.layer) || 206 | (topLayersForCell.First.Value < 0 && c.layer >= 0) || 207 | (topLayersForCell.First.Value < 0 && c.layer < 0 && topLayersForCell.First.Value < c.layer)) { 208 | topLayersForCell.AddFirst(c.layer); 209 | return; 210 | } 211 | 212 | // insert layer 213 | LinkedListNode current = topLayersForCell.First; 214 | while (current.Next != null) { 215 | 216 | // layer already exists 217 | if (current.Value == c.layer || current.Next.Value == c.layer) { 218 | return; 219 | } 220 | 221 | // found a position to insert layer 222 | if ((current.Value >= 0 && c.layer >= 0 && current.Next.Value >= 0 && current.Value < c.layer && current.Next.Value > c.layer) || 223 | (current.Value >= 0 && c.layer >= 0 && current.Next.Value < 0 && current.Value < c.layer) || 224 | (current.Value >= 0 && c.layer < 0 && current.Next.Value < 0 && current.Next.Value < c.layer) || 225 | (current.Value < 0 && c.layer < 0 && current.Value > c.layer && current.Next.Value < c.layer)) { 226 | topLayersForCell.AddAfter(current, c.layer); 227 | return; 228 | } 229 | 230 | current = current.Next; 231 | } 232 | } else { 233 | throw new UnityException("Display not yet initialized!"); 234 | } 235 | } 236 | 237 | public void RemoveCellAsTopLayer(Cell c){ 238 | 239 | if (initialized) { 240 | 241 | // get top layers for cell 242 | LinkedList topLayersForCell = topLayers[(int)c.position.x, (int)c.position.y]; 243 | 244 | // remove layer 245 | if (topLayersForCell.Contains(c.layer)) { 246 | topLayersForCell.Remove(c.layer); 247 | } 248 | } else { 249 | throw new UnityException("Display not yet initialized!"); 250 | } 251 | } 252 | 253 | public LinkedList GetTopLayersForCell(int x, int y){ 254 | if (initialized) { 255 | if (x >= 0 && y >= 0 && x < displayWidth && y < displayHeight) { 256 | return topLayers[x, y]; 257 | } else { 258 | return new LinkedList(); 259 | } 260 | } else { 261 | throw new UnityException("Display not yet initialized!"); 262 | } 263 | } 264 | 265 | public Color GetBackgroundColorForCell(int x, int y, params int[] excludedLayers){ 266 | 267 | if (initialized) { 268 | List excludedLayersList = new List(excludedLayers); 269 | 270 | // get background color of cell previous to excluded layers 271 | LinkedList topLayer = GetTopLayersForCell(x, y); 272 | if (topLayer.First != null && !excludedLayersList.Contains(topLayer.First.Value)) { 273 | LinkedListNode topLayerNode = topLayer.Last; 274 | while (excludedLayersList.Contains(topLayerNode.Value)) { 275 | topLayerNode = topLayerNode.Previous; 276 | } 277 | Cell cell = GetCell(topLayerNode.Value, x, y); 278 | return (cell != null) ? cell.backgroundColor : clearColor; 279 | } 280 | 281 | return clearColor; 282 | } else { 283 | throw new UnityException("Display not yet initialized!"); 284 | } 285 | } 286 | 287 | public void Update(){ 288 | 289 | // finished initializing 290 | if (initialized) { 291 | 292 | // update cells 293 | LinkedListNode cellNode = cellList.First; 294 | while(cellNode!=null){ 295 | cellNode.Value.Update(); 296 | cellNode = cellNode.Next; 297 | } 298 | 299 | // update display meshes 300 | for (int y = 0; y < displayHeight; y++) { 301 | for (int x = 0; x < displayWidth; x++) { 302 | 303 | // get top layer for cell 304 | LinkedList topLayersForCell = topLayers[x,y]; 305 | 306 | // get cell at top layer 307 | Cell cell = null; 308 | if (topLayersForCell.First != null) { 309 | cell = cells[topLayersForCell.Last.Value][x, y]; 310 | } 311 | 312 | // empty cell 313 | if (cell == null || cell.content == "") { 314 | for (int i = 0; i < 4; i++) { 315 | 316 | // update display mesh vertices, uvs and colors 317 | foreground.meshVertices[(y * displayWidth + x) * 4 + i] = zero3; 318 | foreground.meshUVs[(y * displayWidth + x) * 4 + i] = zero2; 319 | foreground.meshColors[(y * displayWidth + x) * 4 + i] = clearColor; 320 | background.meshColors[(y * displayWidth + x) * 4 + i] = cell != null ? cell.backgroundColor : clearColor; 321 | } 322 | } 323 | 324 | // filled cell 325 | else { 326 | BitmapFontGlyph glyph = font.GetGlyph(cell.content); 327 | for (int i = 0; i < 4; i++) { 328 | 329 | // update display mesh vertices, uvs and colors 330 | foreground.meshVertices[(y * displayWidth + x) * 4 + i] = new Vector3( 331 | x * quadWidth + glyph.vertices[i].x * quadWidth, 332 | -y * quadHeight + glyph.vertices[i].y * quadHeight - quadHeight, 333 | 0f); 334 | foreground.meshUVs[(y * displayWidth + x) * 4 + i] = glyph.uvs[i]; 335 | foreground.meshColors[(y * displayWidth + x) * 4 + i] = cell.color; 336 | background.meshColors[(y * displayWidth + x) * 4 + i] = cell.backgroundColor; 337 | } 338 | } 339 | } 340 | } 341 | 342 | // apply display mesh updates 343 | background.UpdateMesh(); 344 | foreground.UpdateMesh(); 345 | 346 | // capture screenshot 347 | if (Input.GetKeyDown(KeyCode.P)) { 348 | Application.CaptureScreenshot("ascii_" + Random.Range(0, int.MaxValue) + ".png"); 349 | } 350 | } 351 | } 352 | 353 | public IEnumerator Quit(float delay){ 354 | yield return new WaitForSeconds(delay); 355 | Application.Quit(); 356 | } 357 | 358 | public static bool IsInitialized(){ 359 | return GET.initialized; 360 | } 361 | 362 | public static Cell CellAt(int layer, float x, float y){ 363 | return GET.GetCell(layer, x, y); 364 | } 365 | 366 | public static int GetDisplayWidth(){ 367 | if (GET.initialized) { 368 | return GET.displayWidth; 369 | } else { 370 | throw new UnityException("Display not yet initialized!"); 371 | } 372 | } 373 | 374 | public static int GetDisplayHeight(){ 375 | if (GET.initialized) { 376 | return GET.displayHeight; 377 | } else { 378 | throw new UnityException("Display not yet initialized!"); 379 | } 380 | } 381 | } 382 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Display.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6198a9c52e3051e489933c3ba6434896 3 | timeCreated: 1477224367 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/DisplayMesh.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class DisplayMesh : MonoBehaviour { 5 | 6 | [HideInInspector] 7 | public Mesh mesh; 8 | 9 | [HideInInspector] 10 | public Vector3[] meshVertices; 11 | 12 | [HideInInspector] 13 | public Vector2[] meshUVs; 14 | 15 | [HideInInspector] 16 | public Color[] meshColors; 17 | 18 | private MeshRenderer meshRenderer; 19 | 20 | public void CombineQuads(CombineInstance[] combineInstances, string name, Material material, float z){ 21 | 22 | // combine quads into a single mesh 23 | MeshFilter meshFilter = gameObject.AddComponent(); 24 | mesh = meshFilter.mesh = new Mesh(); 25 | mesh.name = name; 26 | mesh.CombineMeshes(combineInstances, true, true); 27 | 28 | // add mesh renderer 29 | meshRenderer = gameObject.AddComponent(); 30 | meshRenderer.sharedMaterial = material; 31 | meshRenderer.enabled = false; 32 | meshRenderer.receiveShadows = false; 33 | meshRenderer.shadowCastingMode = UnityEngine.Rendering.ShadowCastingMode.Off; 34 | 35 | // get mesh vertices 36 | meshVertices = mesh.vertices; 37 | 38 | // get mesh uvs 39 | meshUVs = mesh.uv; 40 | 41 | // init combined mesh vertex colors 42 | meshColors = new Color[mesh.vertexCount]; 43 | 44 | // recalculate bounds 45 | mesh.RecalculateBounds(); 46 | 47 | // center mesh 48 | gameObject.transform.position = new Vector3( 49 | -meshRenderer.bounds.extents.x, 50 | meshRenderer.bounds.extents.y, 51 | z); 52 | } 53 | 54 | public void UpdateMesh(){ 55 | 56 | // update mesh and enable renderer 57 | mesh.vertices = meshVertices; 58 | mesh.uv = meshUVs; 59 | mesh.colors = meshColors; 60 | meshRenderer.enabled = true; 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /Scripts/PhiOS/DisplayMesh.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 75dbc0f80ebb6f342a716eaadcb721c9 3 | timeCreated: 1479598609 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 800299e32980f3849a3cba2c51975ac0 3 | folderAsset: yes 4 | timeCreated: 1481019065 5 | licenseType: Pro 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Editor/DisplayEditor.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using UnityEditor; 3 | using System.Collections.Generic; 4 | 5 | [CustomEditor(typeof(Display))] 6 | public class DisplayEditor : Editor { 7 | 8 | public override void OnInspectorGUI(){ 9 | base.OnInspectorGUI (); 10 | 11 | if (!Application.isPlaying) { 12 | Display display = (Display)target; 13 | 14 | // force display height to 0 if auto calculating 15 | if (display.autoDisplayHeight && display.displayHeight != 0) { 16 | display.displayHeight = 0; 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Editor/DisplayEditor.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aef9fbcfbea5d424face0cf8dd80a1da 3 | timeCreated: 1479803077 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Mouse.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | 5 | public class Mouse : MonoBehaviour { 6 | 7 | public bool hideNativeCursor = true; 8 | public int reservedLayer = -1; 9 | public string cursorUp = "░"; 10 | public string cursorDown = "█"; 11 | public Color cursorColor; 12 | public float cursorFadeTime = 0.25f; 13 | public bool fadeToClear = true; 14 | 15 | private bool initialized = false; 16 | private float screenXMin = 0f; 17 | private float screenXMax = 0f; 18 | private float screenYMin = 0f; 19 | private float screenYMax = 0f; 20 | private Cell currentCell; 21 | private Cell currentCellHover; 22 | private IHoverAction hoverAction; 23 | private bool dragging = false; 24 | private Vector2 dragStart; 25 | private IDragAction dragAction; 26 | 27 | public void Awake(){ 28 | 29 | // hide default mouse cursor 30 | if (hideNativeCursor) { 31 | Cursor.visible = false; 32 | } 33 | } 34 | 35 | public IEnumerator Start (){ 36 | 37 | // wait until display is initialized 38 | Display display = Display.GET; 39 | while (!display.initialized) { 40 | yield return null; 41 | } 42 | 43 | yield return null; 44 | 45 | // calculate screen boundaries 46 | Camera mainCamera = display.mainCamera; 47 | screenXMin = mainCamera.WorldToViewportPoint(display.foreground.GetComponent().bounds.min).x; 48 | screenXMax = mainCamera.WorldToViewportPoint(display.foreground.GetComponent().bounds.max).x; 49 | screenYMin = mainCamera.WorldToViewportPoint(display.foreground.GetComponent().bounds.min).y; 50 | screenYMax = mainCamera.WorldToViewportPoint(display.foreground.GetComponent().bounds.max).y; 51 | 52 | // initialized 53 | initialized = true; 54 | } 55 | 56 | public void Update(){ 57 | 58 | // initialized 59 | if (initialized) { 60 | 61 | Display display = Display.GET; 62 | Camera mainCamera = display.mainCamera; 63 | 64 | // get mouse cursor position 65 | Vector3 mousePosition = mainCamera.ScreenToViewportPoint(Input.mousePosition); 66 | mousePosition = new Vector3 (mousePosition.x, 1f - mousePosition.y); 67 | 68 | // clamp mouse position within screen 69 | mousePosition = new Vector3( 70 | Mathf.Clamp(mousePosition.x, screenXMin, screenXMax), 71 | Mathf.Clamp(mousePosition.y, screenYMin, screenYMax)); 72 | 73 | // get new cell position 74 | Vector2 cellPosition = new Vector2 ( 75 | Mathf.FloorToInt (((mousePosition.x - screenXMin) / (screenXMax - screenXMin)) * display.displayWidth), 76 | Mathf.FloorToInt (((mousePosition.y - screenYMin) / (screenYMax - screenYMin)) * display.displayHeight)); 77 | 78 | // clamp cell position within display 79 | cellPosition = new Vector2 ( 80 | Mathf.Clamp (cellPosition.x, 0f, display.displayWidth - 1), 81 | Mathf.Clamp (cellPosition.y, 0f, display.displayHeight - 1)); 82 | 83 | // clear current cell 84 | if (currentCell != null) { 85 | 86 | // get background color to clear to 87 | Color clearColor = display.GetBackgroundColorForCell( 88 | (int)currentCell.position.x, 89 | (int)currentCell.position.y, 90 | reservedLayer); 91 | 92 | // clear cell content 93 | currentCell.SetContent ( 94 | "", 95 | clearColor, 96 | fadeToClear ? display.clearColor : cursorColor, 97 | cursorFadeTime, 98 | cursorColor, 99 | CellFades.DEFAULT_REVERSE); 100 | currentCell = null; 101 | } 102 | 103 | // reset current cell hover 104 | currentCellHover = null; 105 | 106 | // new current cell 107 | currentCell = display.GetCell(reservedLayer, cellPosition.x, cellPosition.y); 108 | 109 | // get background color for current cell 110 | Color currentCellBackgroundColor = display.GetBackgroundColorForCell( 111 | (int)currentCell.position.x, 112 | (int)currentCell.position.y, 113 | reservedLayer); 114 | 115 | // highlight cell 116 | currentCell.SetContent ( 117 | Input.GetMouseButton (0) || Input.GetMouseButton (1) ? cursorDown : cursorUp, 118 | currentCellBackgroundColor, 119 | cursorColor, 120 | 0f, 121 | cursorColor, 122 | ""); 123 | 124 | // hover 125 | if (!dragging) { 126 | for (int i = display.GetNumLayers() - 1; i >= 0; i--) { 127 | Cell cellHover = display.GetCell (i, currentCell.position.x, currentCell.position.y); 128 | 129 | // hover on topmost layer 130 | if (cellHover.content != "") { 131 | 132 | // set new hover cell 133 | currentCellHover = cellHover; 134 | 135 | // new hover cell has a hover action 136 | if (currentCellHover.hoverAction != null) { 137 | 138 | // current hover action is different to new hover action 139 | if (hoverAction != currentCellHover.hoverAction) { 140 | 141 | // current hover exit 142 | if (hoverAction != null) { 143 | hoverAction.OnHoverExit(); 144 | } 145 | 146 | // new hover enter 147 | hoverAction = currentCellHover.hoverAction; 148 | hoverAction.OnHoverEnter(); 149 | } 150 | } 151 | 152 | // new hover cell has no hover action, just exit current hover action 153 | else if (hoverAction != null) { 154 | hoverAction.OnHoverExit(); 155 | hoverAction = null; 156 | } 157 | 158 | break; 159 | } 160 | } 161 | } 162 | 163 | // click 164 | if (!dragging) { 165 | if (Input.GetMouseButtonDown(0) && 166 | currentCellHover != null && 167 | currentCellHover.clickAction != null) { 168 | currentCellHover.clickAction.OnMouseDown(); 169 | } 170 | } 171 | 172 | // drag start 173 | if (!dragging && 174 | Input.GetMouseButtonDown(0) && 175 | currentCellHover != null && 176 | currentCellHover.dragAction != null) { 177 | dragging = true; 178 | dragStart = currentCell.position; 179 | dragAction = currentCellHover.dragAction; 180 | dragAction.OnDragStart(); 181 | } 182 | 183 | // drag end 184 | else if (dragging && 185 | Input.GetMouseButtonUp(0) && 186 | dragAction != null) { 187 | dragging = false; 188 | Vector2 dragDelta = currentCell.position - dragStart; 189 | dragAction.OnDragDelta(dragDelta); 190 | dragAction = null; 191 | } 192 | 193 | // drag delta 194 | else if (dragging && 195 | dragAction != null) { 196 | Vector2 dragDelta = currentCell.position - dragStart; 197 | dragAction.OnDragDelta(dragDelta); 198 | } 199 | 200 | // scroll 201 | if (!dragging) { 202 | if (Input.mouseScrollDelta.y != 0f && 203 | currentCellHover != null && 204 | currentCellHover.scrollAction != null) { 205 | currentCellHover.scrollAction.OnScrollDelta(Mathf.RoundToInt(Input.mouseScrollDelta.y)); 206 | } 207 | } 208 | } 209 | } 210 | } 211 | -------------------------------------------------------------------------------- /Scripts/PhiOS/Mouse.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ecc57b986fa74f64d90410580da2a029 3 | timeCreated: 1477912004 4 | licenseType: Pro 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Shaders/AlphaVertexColor.shader: -------------------------------------------------------------------------------- 1 | Shader "Phigames/Alpha Vertex Color" { 2 | Properties { 3 | _Color ("Color", Color) = (1,1,1,1) 4 | _MainTex ("Base (RGB) Trans (A)", 2D) = "white" {} 5 | } 6 | 7 | SubShader { 8 | ZWrite Off 9 | Alphatest Greater 0 10 | Tags {Queue=Transparent} 11 | Blend SrcAlpha OneMinusSrcAlpha 12 | ColorMask RGB 13 | Pass { 14 | ColorMaterial AmbientAndDiffuse 15 | Lighting Off 16 | SeparateSpecular Off 17 | SetTexture [_MainTex] { 18 | Combine texture * primary, texture * primary 19 | } 20 | SetTexture [_MainTex] { 21 | constantColor [_Color] 22 | Combine previous * constant DOUBLE, previous * constant 23 | } 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /Shaders/AlphaVertexColor.shader.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fbe2feefb8a7bd742b1de5d606b4412c 3 | timeCreated: 1479286077 4 | licenseType: Pro 5 | ShaderImporter: 6 | defaultTextures: [] 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | --------------------------------------------------------------------------------