コード例 #1
0
    internal void ChangeDragger(FortressDragger collided, bool entered)
    {
        if (entered)
        {
            if (draggedIn != null)
            {
                return;
            }

            draggedIn = collided;
            draggedIn.GetComponent <Image>().color = Color.yellow;
        }
        else
        {
            if (draggedIn != null && collided == draggedIn)
            {
                if (draggedIn != null)
                {
                    draggedIn.GetComponent <Image>().color = Color.white;
                }
                draggedIn = null;
            }
        }
        parent.CheckDefenceReady();
    }
コード例 #2
0
 internal void ResetButton()
 {
     GetComponent <Image>().color = Color.white;
     draggedIn = null;
 }