Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/activation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Acquire activation file
on:
workflow_dispatch: {}
jobs:
activation:
name: Request manual activation file 🔑
runs-on: ubuntu-latest
steps:
# Request manual activation file
- name: Request manual activation file
id: getManualLicenseFile
uses: game-ci/unity-request-activation-file@v2
# Upload artifact (Unity_v20XX.X.XXXX.alf)
- name: Expose as artifact
uses: actions/upload-artifact@v2
with:
name: ${{ steps.getManualLicenseFile.outputs.filePath }}
path: ${{ steps.getManualLicenseFile.outputs.filePath }}
47 changes: 47 additions & 0 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Build Apps

on:
push:
branches:
pull_request:
workflow_dispatch:

jobs:
build-windows:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: StandaloneWindows64

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: DLS-windows-64.zip
path: build

build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
uses: game-ci/unity-builder@v2
env:
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
with:
targetPlatform: StandaloneLinux64

- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: DLS-Linux.zip
path: build

10 changes: 5 additions & 5 deletions Assets/Prefabs/Chip Design/Builtin Chips/7-Seg Display.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -845,12 +845,12 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 56121cab9da574d2b97c854754749ada, type: 3}
m_Name:
m_EditorClassIdentifier:
chipType: 2
chipType: 0
nameText: {fileID: 8290674754392318984}
container: {fileID: 2610731671916508212}
chipPinPrefab: {fileID: 8774343771143846598, guid: 3f5693e72562648d19f39eace0ccffd6,
type: 3}
override_width_and_height: 1
override_width_and_height: 0
override_width: 1.8
override_height: 2
--- !u!61 &7323259885008881835
Expand Down Expand Up @@ -1238,7 +1238,7 @@ Transform:
m_GameObject: {fileID: 9053900416891449010}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0.01}
m_LocalScale: {x: 1.46, y: 1.76, z: 1}
m_LocalScale: {x: 1.5636971, y: 1.76, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1061605310987190673}
Expand Down Expand Up @@ -1451,7 +1451,7 @@ PrefabInstance:
- target: {fileID: -8679921383154817045, guid: 6a76e2f11baf96347ad77ec5aa677e00,
type: 3}
propertyPath: m_LocalScale.y
value: 0.4147727
value: 0.41477266
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 6a76e2f11baf96347ad77ec5aa677e00,
type: 3}
Expand All @@ -1461,7 +1461,7 @@ PrefabInstance:
- target: {fileID: -8679921383154817045, guid: 6a76e2f11baf96347ad77ec5aa677e00,
type: 3}
propertyPath: m_LocalPosition.x
value: 0.09520546
value: 0.09521066
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 6a76e2f11baf96347ad77ec5aa677e00,
type: 3}
Expand Down
65 changes: 42 additions & 23 deletions Assets/Scripts/Chip/SevenSegmentDisplay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,51 @@
using UnityEngine;


public class SevenSegmentDisplay : BuiltinChip
{
[SerializeField] MeshRenderer[] segments;
public Color offCol;
public Color onCol;
public Color highlightCol;
public class SevenSegmentDisplay : BuiltinChip
{
[SerializeField] MeshRenderer[] segments;
public Color offCol;
public Color onCol;
public Color highlightCol;

void Update()
{
var package = GetComponent<ChipPackage>();
if (package != null)
{
package.override_width_and_height = true;
package.override_width = ScalingManager.scale * 1.8f;
package.override_height = ScalingManager.scale *2.0f;
package.SetSizeAndSpacing(this);
}
}

protected override void Start()
{
for (int i = 0; i < segments.Length; i++)
{
segments[i].sharedMaterial = Material.Instantiate(segments[i].sharedMaterial);
}
}
protected override void Awake()
{
base.Awake();
for (int i = 0; i < segments.Length; i++)
{
segments[i].sharedMaterial = Material.Instantiate(segments[i].sharedMaterial);
segments[i].sharedMaterial.color = offCol;
}
var package = GetComponent<ChipPackage>();
if (package != null)
{
package.override_width_and_height = true;
package.override_width = ScalingManager.scale * 1.8f;
package.override_height = ScalingManager.scale *2.0f;
package.SetSizeAndSpacing(this);
}
}

protected override void ProcessOutput()
{
for (int i = 0; i < inputPins.Length ; i++)
{
Color col = inputPins[i].State == 1 ? onCol : offCol;
segments[i].sharedMaterial.color = col;
inputPins[i].tellPinSimIsOff();
}
}

protected override void ProcessOutput()
{
for (int i = 0; i < inputPins.Length ; i++)
{
Color col = inputPins[i].State == 1 ? onCol : offCol;
segments[i].sharedMaterial.color = col;
}
}
}
}