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
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
using UnityEngine.UI; | |
using UnityEngine.EventSystems; | |
public class UIUtility : MonoBehaviour | |
{ | |
//Adds GameObject -> UI -> Dropdown menu item that instantiates | |
//a new button and attaches a dropdown component. |
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
using UnityEngine; | |
using UnityEditor; | |
using System.Collections; | |
using UnityEngine.UI; | |
[CustomEditor(typeof(Dropdown))] | |
public class DropdownEditor : Editor | |
{ | |
public Dropdown currDropdown; |
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
using UnityEngine; | |
using System.Collections; | |
using UnityEngine.EventSystems; | |
using UnityEngine.UI; | |
public class Dropdown : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler | |
{ | |
public RectTransform container; | |
public bool isOpen; | |
public Text mainText; |
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
using UnityEngine; | |
using System.Collections; | |
public class TargetDamage : MonoBehaviour | |
{ | |
private GameControl control; // Access to the GameControl script | |
private float damageImpactSpeedSqr; // The square value of Damage Impact Speed, for efficient calculation | |
private SpriteRenderer spriteRenderer; // The reference to this GameObject's sprite renderer |
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
using UnityEngine; | |
public class HoverTarget : MonoBehaviour | |
{ | |
private Rigidbody2D rigidBody; | |
private bool stationary; | |
// Use this for initialization | |
void Start () | |
{ |