-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,422 additions
and
4 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
using UnityEngine.UI; | ||
|
||
namespace Netherlands3D.Twin | ||
{ | ||
public class stempelkaart : MonoBehaviour | ||
{ | ||
[SerializeField] private Sprite vol; | ||
[SerializeField] private GameObject one; | ||
[SerializeField] private GameObject two; | ||
[SerializeField] private GameObject three; | ||
[SerializeField] private Sprite empty; | ||
[SerializeField] private GameObject stamp; | ||
|
||
private Image img; | ||
|
||
|
||
// Start is called before the first frame update | ||
void Start() | ||
{ | ||
img = GetComponent<Image>(); | ||
img.sprite = empty; | ||
|
||
SetStampEnabled(1, false); | ||
SetStampEnabled(2, false); | ||
SetStampEnabled(3, false); | ||
} | ||
|
||
public void SetStampEnabled(int num, bool enabled) | ||
{ | ||
RectTransform rect = stamp.GetComponent<RectTransform>(); | ||
if (num == 1) | ||
{ | ||
one.SetActive(enabled); | ||
rect.anchoredPosition = new Vector2(rect.anchoredPosition.x, one.GetComponent<RectTransform>().anchoredPosition.y + 30); | ||
} | ||
if (num == 2) | ||
{ | ||
two.SetActive(enabled); | ||
rect.anchoredPosition = new Vector2(rect.anchoredPosition.x, two.GetComponent<RectTransform>().anchoredPosition.y + 30); | ||
} | ||
if (num == 3) | ||
{ | ||
three.SetActive(enabled); | ||
rect.anchoredPosition = new Vector2(rect.anchoredPosition.x, three.GetComponent<RectTransform>().anchoredPosition.y + 30); | ||
} | ||
} | ||
|
||
public void SetStampMarkerEnabled(bool enabled) | ||
{ | ||
stamp.SetActive(enabled); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.