chrisgregan
10 years ago
65 changed files with 2409 additions and 8948 deletions
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 37f6810dcd8fa44b1b2b28c87d4368be |
||||
guid: 1112e45b49be2428080ec04d3ff9e911 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
userData: |
||||
|
Before Width: | Height: | Size: 2.0 MiB |
@ -1,50 +0,0 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 757b68d7ca1c74b2eb40fba9b871b6b1 |
||||
TextureImporter: |
||||
fileIDToRecycleName: |
||||
21300000: Vignette |
||||
21300002: Vignette 1 |
||||
21300004: Background |
||||
serializedVersion: 2 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 0 |
||||
linearTexture: 0 |
||||
correctGamma: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: .25 |
||||
normalMapFilter: 0 |
||||
isReadable: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: -3 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
filterMode: -1 |
||||
aniso: 1 |
||||
mipBias: -1 |
||||
wrapMode: 1 |
||||
nPOTScale: 0 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 1 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: .5, y: .5} |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spritePixelsToUnits: 100 |
||||
alphaIsTransparency: 1 |
||||
textureType: 8 |
||||
buildTargetSettings: [] |
||||
spriteSheet: |
||||
sprites: [] |
||||
spritePackingTag: |
||||
userData: |
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
||||
fileFormatVersion: 2 |
||||
guid: a558a8e18d2ad46de8bf9b8b860ded45 |
||||
DefaultImporter: |
||||
userData: |
@ -1,5 +0,0 @@
|
||||
fileFormatVersion: 2 |
||||
guid: c6f1bcf966a7048d5b0b5ff628f7fb81 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
userData: |
@ -1,331 +0,0 @@
|
||||
%YAML 1.1 |
||||
%TAG !u! tag:unity3d.com,2011: |
||||
--- !u!29 &1 |
||||
SceneSettings: |
||||
m_ObjectHideFlags: 0 |
||||
m_PVSData: |
||||
m_PVSObjectsArray: [] |
||||
m_PVSPortalsArray: [] |
||||
m_OcclusionBakeSettings: |
||||
smallestOccluder: 5 |
||||
smallestHole: .25 |
||||
backfaceThreshold: 100 |
||||
--- !u!104 &2 |
||||
RenderSettings: |
||||
m_Fog: 0 |
||||
m_FogColor: {r: .5, g: .5, b: .5, a: 1} |
||||
m_FogMode: 3 |
||||
m_FogDensity: .00999999978 |
||||
m_LinearFogStart: 0 |
||||
m_LinearFogEnd: 300 |
||||
m_AmbientLight: {r: .200000003, g: .200000003, b: .200000003, a: 1} |
||||
m_SkyboxMaterial: {fileID: 0} |
||||
m_HaloStrength: .5 |
||||
m_FlareStrength: 1 |
||||
m_FlareFadeSpeed: 3 |
||||
m_HaloTexture: {fileID: 0} |
||||
m_SpotCookie: {fileID: 0} |
||||
m_ObjectHideFlags: 0 |
||||
--- !u!127 &3 |
||||
LevelGameManager: |
||||
m_ObjectHideFlags: 0 |
||||
--- !u!157 &4 |
||||
LightmapSettings: |
||||
m_ObjectHideFlags: 0 |
||||
m_LightProbes: {fileID: 0} |
||||
m_Lightmaps: [] |
||||
m_LightmapsMode: 1 |
||||
m_BakedColorSpace: 0 |
||||
m_UseDualLightmapsInForward: 0 |
||||
m_LightmapEditorSettings: |
||||
m_Resolution: 50 |
||||
m_LastUsedResolution: 0 |
||||
m_TextureWidth: 1024 |
||||
m_TextureHeight: 1024 |
||||
m_BounceBoost: 1 |
||||
m_BounceIntensity: 1 |
||||
m_SkyLightColor: {r: .860000014, g: .930000007, b: 1, a: 1} |
||||
m_SkyLightIntensity: 0 |
||||
m_Quality: 0 |
||||
m_Bounces: 1 |
||||
m_FinalGatherRays: 1000 |
||||
m_FinalGatherContrastThreshold: .0500000007 |
||||
m_FinalGatherGradientThreshold: 0 |
||||
m_FinalGatherInterpolationPoints: 15 |
||||
m_AOAmount: 0 |
||||
m_AOMaxDistance: .100000001 |
||||
m_AOContrast: 1 |
||||
m_LODSurfaceMappingDistance: 1 |
||||
m_Padding: 0 |
||||
m_TextureCompression: 0 |
||||
m_LockAtlas: 0 |
||||
--- !u!196 &5 |
||||
NavMeshSettings: |
||||
m_ObjectHideFlags: 0 |
||||
m_BuildSettings: |
||||
agentRadius: .5 |
||||
agentHeight: 2 |
||||
agentSlope: 45 |
||||
agentClimb: .400000006 |
||||
ledgeDropHeight: 0 |
||||
maxJumpAcrossDistance: 0 |
||||
accuratePlacement: 0 |
||||
minRegionArea: 2 |
||||
widthInaccuracy: 16.666666 |
||||
heightInaccuracy: 10 |
||||
m_NavMesh: {fileID: 0} |
||||
--- !u!1 &16019622 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
serializedVersion: 4 |
||||
m_Component: |
||||
- 4: {fileID: 16019624} |
||||
- 114: {fileID: 16019623} |
||||
m_Layer: 0 |
||||
m_Name: FungusScript |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!114 &16019623 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 16019622} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 11500000, guid: 7a334fe2ffb574b3583ff3b18b4792d3, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
scriptScrollPos: {x: 0, y: 0} |
||||
commandScrollPos: {x: 0, y: 0} |
||||
commandViewWidth: 350 |
||||
selectedSequence: {fileID: 1947290628} |
||||
selectedCommand: {fileID: 0} |
||||
variables: [] |
||||
startSequence: {fileID: 1947290628} |
||||
executeOnStart: 1 |
||||
settings: |
||||
runSlowInEditor: 1 |
||||
runSlowDuration: .25 |
||||
colorCommands: 1 |
||||
hideSequenceObjects: 1 |
||||
--- !u!4 &16019624 |
||||
Transform: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 16019622} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
m_LocalPosition: {x: -2.83909988, y: 1.30620003, z: 0} |
||||
m_LocalScale: {x: 1, y: 1, z: 1} |
||||
m_Children: |
||||
- {fileID: 1947290631} |
||||
m_Father: {fileID: 0} |
||||
m_RootOrder: 1 |
||||
--- !u!1 &171864907 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
serializedVersion: 4 |
||||
m_Component: |
||||
- 4: {fileID: 171864911} |
||||
- 114: {fileID: 171864910} |
||||
- 114: {fileID: 171864909} |
||||
- 114: {fileID: 171864908} |
||||
m_Layer: 0 |
||||
m_Name: EventSystem |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!114 &171864908 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 171864907} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 1997211142, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
m_AllowActivationOnStandalone: 0 |
||||
--- !u!114 &171864909 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 171864907} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 1077351063, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
m_HorizontalAxis: Horizontal |
||||
m_VerticalAxis: Vertical |
||||
m_SubmitButton: Submit |
||||
m_CancelButton: Cancel |
||||
m_InputActionsPerSecond: 10 |
||||
m_AllowActivationOnMobileDevice: 0 |
||||
--- !u!114 &171864910 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 171864907} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: -619905303, guid: f5f67c52d1564df4a8936ccd202a3bd8, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
m_FirstSelected: {fileID: 0} |
||||
--- !u!4 &171864911 |
||||
Transform: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 171864907} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
m_LocalPosition: {x: 0, y: 0, z: 0} |
||||
m_LocalScale: {x: 1, y: 1, z: 1} |
||||
m_Children: [] |
||||
m_Father: {fileID: 0} |
||||
m_RootOrder: 2 |
||||
--- !u!1 &637969834 |
||||
GameObject: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
serializedVersion: 4 |
||||
m_Component: |
||||
- 4: {fileID: 637969839} |
||||
- 20: {fileID: 637969838} |
||||
- 92: {fileID: 637969837} |
||||
- 124: {fileID: 637969836} |
||||
- 81: {fileID: 637969835} |
||||
m_Layer: 0 |
||||
m_Name: Main Camera |
||||
m_TagString: MainCamera |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!81 &637969835 |
||||
AudioListener: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 637969834} |
||||
m_Enabled: 1 |
||||
--- !u!124 &637969836 |
||||
Behaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 637969834} |
||||
m_Enabled: 1 |
||||
--- !u!92 &637969837 |
||||
Behaviour: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 637969834} |
||||
m_Enabled: 1 |
||||
--- !u!20 &637969838 |
||||
Camera: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 637969834} |
||||
m_Enabled: 1 |
||||
serializedVersion: 2 |
||||
m_ClearFlags: 1 |
||||
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438} |
||||
m_NormalizedViewPortRect: |
||||
serializedVersion: 2 |
||||
x: 0 |
||||
y: 0 |
||||
width: 1 |
||||
height: 1 |
||||
near clip plane: .300000012 |
||||
far clip plane: 1000 |
||||
field of view: 60 |
||||
orthographic: 1 |
||||
orthographic size: 2.48888779 |
||||
m_Depth: -1 |
||||
m_CullingMask: |
||||
serializedVersion: 2 |
||||
m_Bits: 4294967295 |
||||
m_RenderingPath: -1 |
||||
m_TargetTexture: {fileID: 0} |
||||
m_TargetDisplay: 0 |
||||
m_HDR: 0 |
||||
m_OcclusionCulling: 1 |
||||
m_StereoConvergence: 10 |
||||
m_StereoSeparation: .0219999999 |
||||
--- !u!4 &637969839 |
||||
Transform: |
||||
m_ObjectHideFlags: 0 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 637969834} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
m_LocalPosition: {x: 0, y: 0, z: -10} |
||||
m_LocalScale: {x: 1, y: 1, z: 1} |
||||
m_Children: [] |
||||
m_Father: {fileID: 0} |
||||
m_RootOrder: 0 |
||||
--- !u!1 &1947290626 |
||||
GameObject: |
||||
m_ObjectHideFlags: 1 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
serializedVersion: 4 |
||||
m_Component: |
||||
- 4: {fileID: 1947290631} |
||||
- 114: {fileID: 1947290628} |
||||
m_Layer: 0 |
||||
m_Name: Start |
||||
m_TagString: Untagged |
||||
m_Icon: {fileID: 0} |
||||
m_NavMeshLayer: 0 |
||||
m_StaticEditorFlags: 0 |
||||
m_IsActive: 1 |
||||
--- !u!114 &1947290628 |
||||
MonoBehaviour: |
||||
m_ObjectHideFlags: 1 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 1947290626} |
||||
m_Enabled: 1 |
||||
m_EditorHideFlags: 0 |
||||
m_Script: {fileID: 11500000, guid: 3d3d73aef2cfc4f51abf34ac00241f60, type: 3} |
||||
m_Name: |
||||
m_EditorClassIdentifier: |
||||
nodeRect: |
||||
serializedVersion: 2 |
||||
x: -43 |
||||
y: -9 |
||||
width: 100 |
||||
height: 40 |
||||
description: This is the start of your Fungus scene. |
||||
commandList: [] |
||||
--- !u!4 &1947290631 |
||||
Transform: |
||||
m_ObjectHideFlags: 1 |
||||
m_PrefabParentObject: {fileID: 0} |
||||
m_PrefabInternal: {fileID: 0} |
||||
m_GameObject: {fileID: 1947290626} |
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} |
||||
m_LocalPosition: {x: 0, y: 0, z: 0} |
||||
m_LocalScale: {x: 1, y: 1, z: 1} |
||||
m_Children: [] |
||||
m_Father: {fileID: 16019624} |
||||
m_RootOrder: 0 |
@ -1,4 +0,0 @@
|
||||
fileFormatVersion: 2 |
||||
guid: d2460a389a4e84011b52012f3f2fa8bb |
||||
DefaultImporter: |
||||
userData: |
@ -1,5 +0,0 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 20ef3eccfdef341febf3531da566ca35 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
userData: |
File diff suppressed because it is too large
Load Diff
@ -1,4 +0,0 @@
|
||||
fileFormatVersion: 2 |
||||
guid: b73f12587e4454c1898abd60bec2fcab |
||||
DefaultImporter: |
||||
userData: |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,38 +0,0 @@
|
||||
using UnityEngine; |
||||
using System; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("Dialog", |
||||
"Set Choose Dialog", |
||||
"Sets the active dialog to use for displaying story text with the Choose command.")] |
||||
public class SetChooseDialog : Command |
||||
{ |
||||
public ChooseDialog chooseDialog; |
||||
static public ChooseDialog activeDialog; |
||||
|
||||
public override void OnEnter() |
||||
{ |
||||
activeDialog = chooseDialog; |
||||
Continue(); |
||||
} |
||||
|
||||
public override string GetSummary() |
||||
{ |
||||
if (chooseDialog == null) |
||||
{ |
||||
return "Error: No dialog selected"; |
||||
} |
||||
|
||||
return chooseDialog.name; |
||||
} |
||||
|
||||
public override Color GetButtonColor() |
||||
{ |
||||
return new Color32(184, 210, 235, 255); |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,38 +0,0 @@
|
||||
using UnityEngine; |
||||
using System; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("Dialog", |
||||
"Set Say Dialog", |
||||
"Sets the active dialog to use for displaying story text with the Say command.")] |
||||
public class SetSayDialog : Command |
||||
{ |
||||
public SayDialog sayDialog; |
||||
static public SayDialog activeDialog; |
||||
|
||||
public override void OnEnter() |
||||
{ |
||||
activeDialog = sayDialog; |
||||
Continue(); |
||||
} |
||||
|
||||
public override string GetSummary() |
||||
{ |
||||
if (sayDialog == null) |
||||
{ |
||||
return "Error: No dialog selected"; |
||||
} |
||||
|
||||
return sayDialog.name; |
||||
} |
||||
|
||||
public override Color GetButtonColor() |
||||
{ |
||||
return new Color32(184, 210, 235, 255); |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,33 +0,0 @@
|
||||
using UnityEditor; |
||||
using UnityEditorInternal; |
||||
using UnityEngine; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using Rotorz.ReorderableList; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
|
||||
[CustomEditor (typeof(SetChooseDialog))] |
||||
public class SetChooseDialogEditor : CommandEditor |
||||
{ |
||||
protected SerializedProperty chooseDialogProp; |
||||
|
||||
protected virtual void OnEnable() |
||||
{ |
||||
chooseDialogProp = serializedObject.FindProperty("chooseDialog"); |
||||
} |
||||
|
||||
public override void DrawCommandGUI() |
||||
{ |
||||
serializedObject.Update(); |
||||
|
||||
CommandEditor.ObjectField<ChooseDialog>(chooseDialogProp, |
||||
new GUIContent("Choose Dialog", "Dialog to use when displaying options with the Choose command."), |
||||
new GUIContent("<None>"), |
||||
ChooseDialog.activeDialogs); |
||||
serializedObject.ApplyModifiedProperties(); |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,34 +0,0 @@
|
||||
using UnityEditor; |
||||
using UnityEditorInternal; |
||||
using UnityEngine; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using Rotorz.ReorderableList; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
|
||||
[CustomEditor (typeof(SetSayDialog))] |
||||
public class SetSayDialogEditor : CommandEditor |
||||
{ |
||||
protected SerializedProperty sayDialogProp; |
||||
|
||||
protected virtual void OnEnable() |
||||
{ |
||||
sayDialogProp = serializedObject.FindProperty("sayDialog"); |
||||
} |
||||
|
||||
public override void DrawCommandGUI() |
||||
{ |
||||
serializedObject.Update(); |
||||
|
||||
CommandEditor.ObjectField<SayDialog>(sayDialogProp, |
||||
new GUIContent("Say Dialog", "Dialog to use when displaying Say command story text"), |
||||
new GUIContent("<None>"), |
||||
SayDialog.activeDialogs); |
||||
|
||||
serializedObject.ApplyModifiedProperties(); |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 926adf8389384479eb93ef4d6ce8eb33 |
||||
guid: ea6e8f632db87477eb750446b28d73a3 |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 69d14ccff3ce441ecba28c9a53b98a08 |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
@ -0,0 +1,79 @@
|
||||
// Original code by Martin Ecker (http://martinecker.com) |
||||
|
||||
using UnityEngine; |
||||
|
||||
// Helper Rect extension methods |
||||
public static class RectExtensions |
||||
{ |
||||
public static Vector2 TopLeft(this Rect rect) |
||||
{ |
||||
return new Vector2(rect.xMin, rect.yMin); |
||||
} |
||||
|
||||
public static Rect ScaleSizeBy(this Rect rect, float scale) |
||||
{ |
||||
return rect.ScaleSizeBy(scale, rect.center); |
||||
} |
||||
|
||||
public static Rect ScaleSizeBy(this Rect rect, float scale, Vector2 pivotPoint) |
||||
{ |
||||
Rect result = rect; |
||||
result.x -= pivotPoint.x; |
||||
result.y -= pivotPoint.y; |
||||
result.xMin *= scale; |
||||
result.xMax *= scale; |
||||
result.yMin *= scale; |
||||
result.yMax *= scale; |
||||
result.x += pivotPoint.x; |
||||
result.y += pivotPoint.y; |
||||
return result; |
||||
} |
||||
|
||||
public static Rect ScaleSizeBy(this Rect rect, Vector2 scale) |
||||
{ |
||||
return rect.ScaleSizeBy(scale, rect.center); |
||||
} |
||||
|
||||
public static Rect ScaleSizeBy(this Rect rect, Vector2 scale, Vector2 pivotPoint) |
||||
{ |
||||
Rect result = rect; |
||||
result.x -= pivotPoint.x; |
||||
result.y -= pivotPoint.y; |
||||
result.xMin *= scale.x; |
||||
result.xMax *= scale.x; |
||||
result.yMin *= scale.y; |
||||
result.yMax *= scale.y; |
||||
result.x += pivotPoint.x; |
||||
result.y += pivotPoint.y; |
||||
return result; |
||||
} |
||||
} |
||||
|
||||
public class EditorZoomArea |
||||
{ |
||||
private const float kEditorWindowTabHeight = 21.0f; |
||||
private static Matrix4x4 _prevGuiMatrix; |
||||
|
||||
public static Rect Begin(float zoomScale, Rect screenCoordsArea) |
||||
{ |
||||
GUI.EndGroup(); // End the group Unity begins automatically for an EditorWindow to clip out the window tab. This allows us to draw outside of the size of the EditorWindow. |
||||
|
||||
Rect clippedArea = screenCoordsArea.ScaleSizeBy(1.0f / zoomScale, screenCoordsArea.TopLeft()); |
||||
clippedArea.y += kEditorWindowTabHeight; |
||||
GUI.BeginGroup(clippedArea); |
||||
|
||||
_prevGuiMatrix = GUI.matrix; |
||||
Matrix4x4 translation = Matrix4x4.TRS(clippedArea.TopLeft(), Quaternion.identity, Vector3.one); |
||||
Matrix4x4 scale = Matrix4x4.Scale(new Vector3(zoomScale, zoomScale, 1.0f)); |
||||
GUI.matrix = translation * scale * translation.inverse * GUI.matrix; |
||||
|
||||
return clippedArea; |
||||
} |
||||
|
||||
public static void End() |
||||
{ |
||||
GUI.matrix = _prevGuiMatrix; |
||||
GUI.EndGroup(); |
||||
GUI.BeginGroup(new Rect(0.0f, kEditorWindowTabHeight, Screen.width, Screen.height)); |
||||
} |
||||
} |
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 60846452b4dd44937b12b1c00111d8fc |
||||
guid: 21069ce91309a44daa0798b2d7c3635b |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
@ -0,0 +1,122 @@
|
||||
using UnityEngine; |
||||
using UnityEditor; |
||||
using System; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
|
||||
internal static class FungusEditorResources |
||||
{ |
||||
|
||||
static FungusEditorResources() { |
||||
GenerateSpecialTextures(); |
||||
LoadResourceAssets(); |
||||
} |
||||
|
||||
private enum ResourceName |
||||
{ |
||||
add_button = 0, |
||||
add_button_active, |
||||
title_background, |
||||
command_background |
||||
} |
||||
|
||||
private static string[] s_LightSkin = { |
||||
|
||||
"iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9e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ca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAC1JREFUeNpiXLlyJQM2wMLAwBAWFoYmumrVKiYGHIAeEiwQN2BKAAAAAP//AwCS4wcNfhpDgQAAAABJRU5ErkJggg==" |
||||
}; |
||||
|
||||
public static Texture2D texAddButton |
||||
{ |
||||
get { return s_Cached[(int)ResourceName.add_button]; } |
||||
} |
||||
|
||||
public static Texture2D texAddButtonActive |
||||
{ |
||||
get { return s_Cached[(int)ResourceName.add_button_active]; } |
||||
} |
||||
|
||||
public static Texture2D texTitleBackground |
||||
{ |
||||
get { return s_Cached[(int)ResourceName.title_background]; } |
||||
} |
||||
|
||||
public static Texture2D texCommandBackground |
||||
{ |
||||
get { return s_Cached[(int)ResourceName.command_background]; } |
||||
} |
||||
|
||||
public static Texture2D texItemSplitter { get; private set; } |
||||
|
||||
private static void GenerateSpecialTextures() |
||||
{ |
||||
var splitterColor = EditorGUIUtility.isProSkin |
||||
? new Color(1f, 1f, 1f, 0.14f) |
||||
: new Color(0.59f, 0.59f, 0.59f, 0.55f) |
||||
; |
||||
texItemSplitter = CreatePixelTexture("(Generated) Item Splitter", splitterColor); |
||||
} |
||||
|
||||
public static Texture2D CreatePixelTexture(string name, Color color) |
||||
{ |
||||
var tex = new Texture2D(1, 1, TextureFormat.ARGB32, false, true); |
||||
tex.name = name; |
||||
tex.hideFlags = HideFlags.HideAndDontSave; |
||||
tex.filterMode = FilterMode.Point; |
||||
tex.SetPixel(0, 0, color); |
||||
tex.Apply(); |
||||
return tex; |
||||
} |
||||
|
||||
private static Texture2D[] s_Cached; |
||||
|
||||
public static void LoadResourceAssets() |
||||
{ |
||||
var skin = EditorGUIUtility.isProSkin ? s_DarkSkin : s_LightSkin; |
||||
s_Cached = new Texture2D[skin.Length]; |
||||
|
||||
for (int i = 0; i < s_Cached.Length; ++i) { |
||||
// Get image data (PNG) from base64 encoded strings. |
||||
byte[] imageData = Convert.FromBase64String(skin[i]); |
||||
|
||||
// Gather image size from image data. |
||||
int texWidth, texHeight; |
||||
GetImageSize(imageData, out texWidth, out texHeight); |
||||
|
||||
// Generate texture asset. |
||||
var tex = new Texture2D(texWidth, texHeight, TextureFormat.ARGB32, false, true); |
||||
tex.hideFlags = HideFlags.HideAndDontSave; |
||||
tex.name = "(Generated) ReorderableList:" + i; |
||||
tex.filterMode = FilterMode.Point; |
||||
tex.LoadImage(imageData); |
||||
|
||||
s_Cached[i] = tex; |
||||
} |
||||
|
||||
s_LightSkin = null; |
||||
s_DarkSkin = null; |
||||
} |
||||
|
||||
private static void GetImageSize(byte[] imageData, out int width, out int height) |
||||
{ |
||||
width = ReadInt(imageData, 3 + 15); |
||||
height = ReadInt(imageData, 3 + 15 + 2 + 2); |
||||
} |
||||
|
||||
private static int ReadInt(byte[] imageData, int offset) |
||||
{ |
||||
return (imageData[offset] << 8) | imageData[offset + 1]; |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 30d7485e3cb3a4fb0b0440b39c3e0f69 |
||||
guid: d2af387304e4b454b9ce8b815799cad0 |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 2c687730ee4c34a30991abc7996caac4 |
||||
guid: 6e28dc60fedde4c22940b446dd7178b3 |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
userData: |
@ -0,0 +1,29 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("iTween", |
||||
"Move Add", |
||||
"Moves a game object by a specified offset over time.")] |
||||
public class MoveAdd : iTweenCommand |
||||
{ |
||||
public Vector3 offset; |
||||
public Space space = Space.Self; |
||||
|
||||
public override void DoTween() |
||||
{ |
||||
Hashtable tweenParams = new Hashtable(); |
||||
tweenParams.Add("amount", offset); |
||||
tweenParams.Add("space", space); |
||||
tweenParams.Add("time", duration); |
||||
tweenParams.Add("easetype", easeType); |
||||
tweenParams.Add("looptype", loopType); |
||||
tweenParams.Add("oncomplete", "OnComplete"); |
||||
tweenParams.Add("oncompletetarget", gameObject); |
||||
tweenParams.Add("oncompleteparams", this); |
||||
iTween.MoveAdd(target, tweenParams); |
||||
} |
||||
} |
||||
|
||||
} |
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 571831413078e48d0bb29a408ee1ba71 |
||||
guid: 598f181ee459641a9b0a5849fbc3240c |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
@ -0,0 +1,29 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("iTween", |
||||
"Move To", |
||||
"Moves a game object to a specified position over time.")] |
||||
public class MoveTo : iTweenCommand |
||||
{ |
||||
public Vector3 position; |
||||
public bool isLocal; |
||||
|
||||
public override void DoTween() |
||||
{ |
||||
Hashtable tweenParams = new Hashtable(); |
||||
tweenParams.Add("position", position); |
||||
tweenParams.Add("time", duration); |
||||
tweenParams.Add("easetype", easeType); |
||||
tweenParams.Add("looptype", loopType); |
||||
tweenParams.Add("isLocal", isLocal); |
||||
tweenParams.Add("oncomplete", "OnComplete"); |
||||
tweenParams.Add("oncompletetarget", gameObject); |
||||
tweenParams.Add("oncompleteparams", this); |
||||
iTween.MoveTo(target, tweenParams); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 445c07472dafe4e0ead0e88c4b757401 |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
@ -0,0 +1,29 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("iTween", |
||||
"Punch Position", |
||||
"Applies a jolt of force to a GameObject's position and wobbles it back to its initial position.")] |
||||
public class PunchPosition : iTweenCommand |
||||
{ |
||||
public Vector3 amount; |
||||
public Space space = Space.Self; |
||||
|
||||
public override void DoTween() |
||||
{ |
||||
Hashtable tweenParams = new Hashtable(); |
||||
tweenParams.Add("amount", amount); |
||||
tweenParams.Add("space", space); |
||||
tweenParams.Add("time", duration); |
||||
tweenParams.Add("easetype", easeType); |
||||
tweenParams.Add("looptype", loopType); |
||||
tweenParams.Add("oncomplete", "OnComplete"); |
||||
tweenParams.Add("oncompletetarget", gameObject); |
||||
tweenParams.Add("oncompleteparams", this); |
||||
iTween.PunchPosition(target, tweenParams); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 720f059c883c4402c89fcc507d5f7e0d |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
@ -0,0 +1,29 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("iTween", |
||||
"Punch Rotation", |
||||
"Applies a jolt of force to a GameObject's rotation and wobbles it back to its initial rotation.")] |
||||
public class PunchRotation : iTweenCommand |
||||
{ |
||||
public Vector3 amount; |
||||
public Space space = Space.Self; |
||||
|
||||
public override void DoTween() |
||||
{ |
||||
Hashtable tweenParams = new Hashtable(); |
||||
tweenParams.Add("amount", amount); |
||||
tweenParams.Add("space", space); |
||||
tweenParams.Add("time", duration); |
||||
tweenParams.Add("easetype", easeType); |
||||
tweenParams.Add("looptype", loopType); |
||||
tweenParams.Add("oncomplete", "OnComplete"); |
||||
tweenParams.Add("oncompletetarget", gameObject); |
||||
tweenParams.Add("oncompleteparams", this); |
||||
iTween.PunchRotation(target, tweenParams); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: ea1bc1400ac79424ba3c1aca77fb5d42 |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
@ -0,0 +1,27 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("iTween", |
||||
"Punch Scale", |
||||
"Applies a jolt of force to a GameObject's scale and wobbles it back to its initial scale.")] |
||||
public class PunchScale : iTweenCommand |
||||
{ |
||||
public Vector3 amount; |
||||
|
||||
public override void DoTween() |
||||
{ |
||||
Hashtable tweenParams = new Hashtable(); |
||||
tweenParams.Add("amount", amount); |
||||
tweenParams.Add("time", duration); |
||||
tweenParams.Add("easetype", easeType); |
||||
tweenParams.Add("looptype", loopType); |
||||
tweenParams.Add("oncomplete", "OnComplete"); |
||||
tweenParams.Add("oncompletetarget", gameObject); |
||||
tweenParams.Add("oncompleteparams", this); |
||||
iTween.PunchScale(target, tweenParams); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: ea4591c01defd496586e9b7237c966c5 |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
@ -0,0 +1,29 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("iTween", |
||||
"Rotate Add", |
||||
"Rotates a game object by the specified angles over time.")] |
||||
public class RotateAdd : iTweenCommand |
||||
{ |
||||
public Vector3 offset; |
||||
public Space space = Space.Self; |
||||
|
||||
public override void DoTween() |
||||
{ |
||||
Hashtable tweenParams = new Hashtable(); |
||||
tweenParams.Add("amount", offset); |
||||
tweenParams.Add("space", space); |
||||
tweenParams.Add("time", duration); |
||||
tweenParams.Add("easetype", easeType); |
||||
tweenParams.Add("looptype", loopType); |
||||
tweenParams.Add("oncomplete", "OnComplete"); |
||||
tweenParams.Add("oncompletetarget", gameObject); |
||||
tweenParams.Add("oncompleteparams", this); |
||||
iTween.RotateAdd(target, tweenParams); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 1a5d3c95fea3b45a595a9993dd9c3158 |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
@ -0,0 +1,29 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("iTween", |
||||
"Rotate To", |
||||
"Rotates a game object to the specified angles over time.")] |
||||
public class RotateTo : iTweenCommand |
||||
{ |
||||
public Vector3 rotation; |
||||
public bool isLocal; |
||||
|
||||
public override void DoTween() |
||||
{ |
||||
Hashtable tweenParams = new Hashtable(); |
||||
tweenParams.Add("rotation", rotation); |
||||
tweenParams.Add("time", duration); |
||||
tweenParams.Add("easetype", easeType); |
||||
tweenParams.Add("looptype", loopType); |
||||
tweenParams.Add("isLocal", isLocal); |
||||
tweenParams.Add("oncomplete", "OnComplete"); |
||||
tweenParams.Add("oncompletetarget", gameObject); |
||||
tweenParams.Add("oncompleteparams", this); |
||||
iTween.RotateTo(target, tweenParams); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: d2dd111db90064d2cb85e3370cdfe3ac |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
@ -0,0 +1,27 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("iTween", |
||||
"Scale Add", |
||||
"Changes a game object's scale by a specified offset over time.")] |
||||
public class ScaleAdd : iTweenCommand |
||||
{ |
||||
public Vector3 offset; |
||||
|
||||
public override void DoTween() |
||||
{ |
||||
Hashtable tweenParams = new Hashtable(); |
||||
tweenParams.Add("amount", offset); |
||||
tweenParams.Add("time", duration); |
||||
tweenParams.Add("easetype", easeType); |
||||
tweenParams.Add("looptype", loopType); |
||||
tweenParams.Add("oncomplete", "OnComplete"); |
||||
tweenParams.Add("oncompletetarget", gameObject); |
||||
tweenParams.Add("oncompleteparams", this); |
||||
iTween.ScaleAdd(target, tweenParams); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: c4998e756a5d84f4ab55e075dad751b1 |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
@ -0,0 +1,27 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
[CommandInfo("iTween", |
||||
"Scale To", |
||||
"Changes a game object's scale to a specified value over time.")] |
||||
public class ScaleTo : iTweenCommand |
||||
{ |
||||
public Vector3 scale; |
||||
|
||||
public override void DoTween() |
||||
{ |
||||
Hashtable tweenParams = new Hashtable(); |
||||
tweenParams.Add("scale", scale); |
||||
tweenParams.Add("time", duration); |
||||
tweenParams.Add("easetype", easeType); |
||||
tweenParams.Add("looptype", loopType); |
||||
tweenParams.Add("oncomplete", "OnComplete"); |
||||
tweenParams.Add("oncompletetarget", gameObject); |
||||
tweenParams.Add("oncompleteparams", this); |
||||
iTween.ScaleTo(target, tweenParams); |
||||
} |
||||
} |
||||
|
||||
} |
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 665e8847cab3749f597622c6c52997ad |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
@ -0,0 +1,62 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
namespace Fungus |
||||
{ |
||||
|
||||
public abstract class iTweenCommand : Command |
||||
{ |
||||
public GameObject target; |
||||
public float duration = 1f; |
||||
public iTween.EaseType easeType = iTween.EaseType.easeInOutQuad; |
||||
public iTween.LoopType loopType = iTween.LoopType.none; |
||||
public bool waitUntilFinished; |
||||
|
||||
public override void OnEnter() |
||||
{ |
||||
if (target == null) |
||||
{ |
||||
Continue(); |
||||
return; |
||||
} |
||||
|
||||
DoTween(); |
||||
|
||||
if (!waitUntilFinished) |
||||
{ |
||||
Continue(); |
||||
} |
||||
} |
||||
|
||||
public virtual void DoTween() |
||||
{} |
||||
|
||||
protected virtual void OnComplete(object param) |
||||
{ |
||||
Command command = param as Command; |
||||
if (command != null && command.Equals(this)) |
||||
{ |
||||
if (waitUntilFinished) |
||||
{ |
||||
Continue(); |
||||
} |
||||
} |
||||
} |
||||
|
||||
public override string GetSummary() |
||||
{ |
||||
if (target == null) |
||||
{ |
||||
return "Error: No target object selected"; |
||||
} |
||||
|
||||
return target.gameObject.name + " over " + duration + " seconds"; |
||||
} |
||||
|
||||
public override Color GetButtonColor() |
||||
{ |
||||
return new Color32(233, 163, 180, 255); |
||||
} |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue