This file contains hidden or 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
| using UnityEngine; | |
| public class BillboardFacingY : MonoBehaviour | |
| { | |
| void Update() | |
| { | |
| // look at camera... | |
| transform.LookAt(Camera.main.transform.position, -Vector3.up); | |
| // then lock rotation to Y axis only... | |
| transform.localEulerAngles = new Vector3(0,transform.localEulerAngles.y,0); |
This file contains hidden or 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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| //[ExecuteInEditMode] | |
| public class CameraFacingBillboard : MonoBehaviour { | |
| [SerializeField] | |
| private Camera referenceCamera; |
This file contains hidden or 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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class MonoObject : MonoBehaviour | |
| { | |
| private PureClass pc; | |
| // Start is called before the first frame update | |
| void Start() |
This file contains hidden or 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
| tell application "Unity" to activate -- needs to be in front | |
| tell application "System Events" to tell application process "Unity" | |
| try | |
| get properties of window 1 | |
| set size of window 1 to {1280, 720} | |
| on error errmess | |
| log errmess | |
| -- no window open | |
| end try | |
| end tell |
This file contains hidden or 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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class GameManager : MonoBehaviour { | |
| private static GameManager instance; | |
| public static GameManager Instance { get { return instance; } } |
This file contains hidden or 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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class AimingTorso : MonoBehaviour { | |
| [SerializeField] | |
| private Transform spine; | |
| [SerializeField] | |
| private float rotationScale = 1.0f; |
This file contains hidden or 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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.EventSystems; // Required when using Event data. | |
| public class ClickableUIObject : MonoBehaviour, IPointerDownHandler, IPointerUpHandler { | |
| public bool clicked = false; | |
This file contains hidden or 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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public enum TypeOfFit | |
| { | |
| ScaleToFit = 0, | |
| BestFit = 1 | |
| } |
This file contains hidden or 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
| using System.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class RetroPhysicsObject : MonoBehaviour { | |
| // Boundary control | |
| [System.Serializable] | |
| public class BoundaryControl | |
| { |
This file contains hidden or 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
| import android.content.Context; | |
| import com.whp.android.SharedPreferencesDao; | |
| import com.whp.android.serialization.SerializationUtils; | |
| import java.io.IOException; | |
| public class PersistenceManager { | |
| /** |