Skip to content

Commit

Permalink
Update build settings and code
Browse files Browse the repository at this point in the history
  • Loading branch information
JadenBalogh committed Sep 7, 2022
1 parent f0d1c28 commit bce8c72
Show file tree
Hide file tree
Showing 16 changed files with 69 additions and 67 deletions.
1 change: 0 additions & 1 deletion Assets/Scripts/Editor/BehaviourTreeWindow.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System.Collections;
using System.Collections.Generic;
using System.Reflection;
using UnityEngine;
using UnityEditor;

Expand Down
2 changes: 1 addition & 1 deletion Assets/Scripts/Tools.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Assets/Scripts/Tools/Class Editor/ClassNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public ClassNode(int level, ClassTierType nodeType)
childIndices = new List<int>();
}

#if UNITY_EDITOR
public void AddChild(int childIndex)
{
if (!childIndices.Contains(childIndex))
Expand Down Expand Up @@ -94,5 +95,6 @@ public void DrawPaths(ClassTree tree)
}

public bool Contains(Vector2 position) => displayRect.Contains(position);
#endif
}
}
2 changes: 2 additions & 0 deletions Assets/Scripts/Tools/Class Editor/ClassTier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public ClassTier(int level, ClassTierType tierType)
}
}

#if UNITY_EDITOR
public void AddNode()
{
nodes.Add(new ClassNode(level, tierType));
Expand Down Expand Up @@ -92,5 +93,6 @@ public void DrawNodes(ClassTree tree, Rect area)
}

public bool Contains(Vector2 position) => displayRect.Contains(position);
#endif
}
}
94 changes: 48 additions & 46 deletions Assets/Scripts/Tools/Class Editor/ClassTree.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,57 @@ public class ClassTree : ScriptableObject
private ClassNode pathStartNode = null;
private Vector2 scrollPosition;

public void Initialize()
public bool ContainsTier(int level)
{
ClearSelection();
pathStartNode = null;
return layers.ContainsKey(level);
}

public bool ContainsTier(int level)
public ClassTierType GetTierType(int level)
{
return layers.ContainsKey(level);
return layers[level].tierType;
}

public LevelUpOption[] GetSkillOptions(int level)
{
return layers[level].nodes[0].levelUpOptions;
}

public ClassBaseStats GetClassBaseStats()
{
return layers[1].nodes[0].classBaseStats;
}

public List<ClassNode> GetChildren(ClassNode parent)
{
List<ClassNode> children = new List<ClassNode>();
int childTierIdx = IndexOfLevel(parent.level) + 1;
if (layers.Count > childTierIdx)
{
int childLevel = layers.Values[childTierIdx].level;
List<ClassNode> childNodes = layers[childLevel].nodes;
foreach (int childIdx in parent.childIndices)
{
children.Add(childNodes[childIdx]);
}
}
return children;
}

public int IndexOfLevel(int level)
{
return layers.IndexOfKey(level);
}

public int IndexOfNode(ClassNode node)
{
return layers[node.level].nodes.IndexOf(node);
}

#if UNITY_EDITOR
public void Initialize()
{
ClearSelection();
pathStartNode = null;
}

public void AddTier(int level, ClassTierType type)
Expand Down Expand Up @@ -118,37 +160,6 @@ public void MoveTier(int oldLevel, int newLevel)
EditorUtility.SetDirty(this);
}

public ClassTierType GetTierType(int level)
{
return layers[level].tierType;
}

public LevelUpOption[] GetSkillOptions(int level)
{
return layers[level].nodes[0].levelUpOptions;
}

public ClassBaseStats GetClassBaseStats()
{
return layers[1].nodes[0].classBaseStats;
}

public List<ClassNode> GetChildren(ClassNode parent)
{
List<ClassNode> children = new List<ClassNode>();
int childTierIdx = IndexOfLevel(parent.level) + 1;
if (layers.Count > childTierIdx)
{
int childLevel = layers.Values[childTierIdx].level;
List<ClassNode> childNodes = layers[childLevel].nodes;
foreach (int childIdx in parent.childIndices)
{
children.Add(childNodes[childIdx]);
}
}
return children;
}

public void AddNode(int level)
{
layers[level].AddNode();
Expand Down Expand Up @@ -248,16 +259,6 @@ public ClassNode GetNodeAt(Vector2 position)
return null;
}

public int IndexOfLevel(int level)
{
return layers.IndexOfKey(level);
}

public int IndexOfNode(ClassNode node)
{
return layers[node.level].nodes.IndexOf(node);
}

public void StartPathEdit(ClassNode startNode)
{
pathStartNode = startNode;
Expand Down Expand Up @@ -329,5 +330,6 @@ private void ClearSelection()
selectedTier = null;
selectedLevel = -1;
}
#endif
}
}
8 changes: 0 additions & 8 deletions Assets/Scripts/Tools/Dialogue Graph/Behaviours.meta

This file was deleted.

2 changes: 2 additions & 0 deletions Assets/Scripts/Tools/Dialogue Graph/DialogueGraph.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public class DialogueGraph : ScriptableObject
public DialogueGraphNode exitNode = new DialogueGraphNode("Exit", new Vector2(200, 0));
[System.NonSerialized] public int selectedNode;

#if UNITY_EDITOR
public void Draw(Vector2 offset)
{
DrawTransitions(offset);
Expand Down Expand Up @@ -133,5 +134,6 @@ private void DrawTransitions(Vector2 offset)
Handles.DrawBezier(from, to, from, to, lineColour, null, LINE_WIDTH);
}
}
#endif
}
}
2 changes: 1 addition & 1 deletion Packages/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"com.unity.ide.rider": "2.0.7",
"com.unity.ide.visualstudio": "2.0.5",
"com.unity.ide.vscode": "1.2.3",
"com.unity.postprocessing": "2.3.0",
"com.unity.postprocessing": "3.2.2",
"com.unity.test-framework": "1.1.20",
"com.unity.textmeshpro": "3.0.1",
"com.unity.timeline": "1.2.14",
Expand Down
6 changes: 4 additions & 2 deletions Packages/packages-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,12 @@
"url": "https://packages.unity.com"
},
"com.unity.postprocessing": {
"version": "2.3.0",
"version": "3.2.2",
"depth": 0,
"source": "registry",
"dependencies": {},
"dependencies": {
"com.unity.modules.physics": "1.0.0"
},
"url": "https://packages.unity.com"
},
"com.unity.test-framework": {
Expand Down
17 changes: 9 additions & 8 deletions ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ PlayerSettings:
targetDevice: 2
useOnDemandResources: 0
accelerometerFrequency: 60
companyName: DefaultCompany
productName: rpg
companyName: UBCO Video Game Development Club
productName: The Duck RPG
defaultCursor: {fileID: 0}
cursorHotspot: {x: 0, y: 0}
m_SplashScreenBackgroundColor: {r: 0.13725491, g: 0.12156863, b: 0.1254902, a: 1}
Expand Down Expand Up @@ -44,8 +44,8 @@ PlayerSettings:
m_HolographicTrackingLossScreen: {fileID: 0}
defaultScreenWidth: 1024
defaultScreenHeight: 768
defaultScreenWidthWeb: 960
defaultScreenHeightWeb: 600
defaultScreenWidthWeb: 1460
defaultScreenHeightWeb: 730
m_StereoRenderingPath: 0
m_ActiveColorSpace: 0
m_MTRendering: 1
Expand Down Expand Up @@ -127,7 +127,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.1
bundleVersion: 1.0
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand All @@ -146,7 +146,7 @@ PlayerSettings:
androidSupportedAspectRatio: 1
androidMaxAspectRatio: 2.1
applicationIdentifier:
Standalone: com.DefaultCompany.rpg
Standalone: com.UBCOVideoGameDevelopmentClub.TheDuckRPG
buildNumber:
Standalone: 0
iPhone: 0
Expand Down Expand Up @@ -539,10 +539,10 @@ PlayerSettings:
webGLDebugSymbols: 0
webGLEmscriptenArgs:
webGLModulesDirectory:
webGLTemplate: APPLICATION:Default
webGLTemplate: APPLICATION:Minimal
webGLAnalyzeBuildSize: 0
webGLUseEmbeddedResources: 0
webGLCompressionFormat: 1
webGLCompressionFormat: 2
webGLWasmArithmeticExceptions: 0
webGLLinkerTarget: 1
webGLThreadsSupport: 0
Expand Down Expand Up @@ -577,6 +577,7 @@ PlayerSettings:
gcWBarrierValidation: 0
apiCompatibilityLevelPerPlatform:
Standalone: 3
WebGL: 3
m_RenderingPath: 1
m_MobileRenderingPath: 1
metroPackageName: Template2D
Expand Down

0 comments on commit bce8c72

Please sign in to comment.