mirror of
https://gitgud.io/AbstractConcept/rimworld-animation-studio.git
synced 2024-08-15 00:43:27 +00:00
GUI rearrangement
This commit is contained in:
parent
04f8c6a2e4
commit
2e50221118
90 changed files with 435 additions and 1440 deletions
22
Assets/Scripts/AnimationComponents/ButtonWithKeyCode.cs
Normal file
22
Assets/Scripts/AnimationComponents/ButtonWithKeyCode.cs
Normal file
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
namespace RimWorldAnimationStudio
|
||||
{
|
||||
public class ButtonWithKeyCode : Button
|
||||
{
|
||||
public KeyCode keyCode;
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (Input.GetKeyDown(keyCode))
|
||||
{ onClick.Invoke(); }
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/AnimationComponents/ButtonWithKeyCode.cs.meta
Normal file
11
Assets/Scripts/AnimationComponents/ButtonWithKeyCode.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1bfc022fc38c6474db2a742159e458f4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
24
Assets/Scripts/AnimationComponents/Chaser.cs
Normal file
24
Assets/Scripts/AnimationComponents/Chaser.cs
Normal file
|
@ -0,0 +1,24 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace RimWorldAnimationStudio
|
||||
{
|
||||
public class Chaser : MonoBehaviour
|
||||
{
|
||||
public GameObject target;
|
||||
public bool chaseAlongX = true;
|
||||
public bool chaseAlongY = false;
|
||||
|
||||
void Update()
|
||||
{
|
||||
if (target == null)
|
||||
{ return; }
|
||||
|
||||
float x = chaseAlongX ? target.transform.position.x : transform.position.x;
|
||||
float y = chaseAlongY ? target.transform.position.y : transform.position.y;
|
||||
|
||||
transform.position = new Vector3(x, y, 0f);
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/AnimationComponents/Chaser.cs.meta
Normal file
11
Assets/Scripts/AnimationComponents/Chaser.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9584d659e560b88409843604ae04229b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue