Open rifaterdemsahin opened 6 years ago
start error after the copy paste
updated namespaces
this is definitely a poc...As I am not using the prefabs to achieve this goal
how to put an event into this box now comes into the question
our code still refers to the old code not to the new one
rebinding worked we also have the drop
it locks with drop
making prefabs will ease our problems...
Drop is a unity feature
Drag and Drop are related to each other
Drag has more events
no yak shaving.... focus on the success of come in order /....debug out success
fastest way.....go to drop event and find out the letter...and compare it to C
focused
it looks like one at a time dragged
Poc is coming to the end...having smaller scope is vital at the design
If the gamecontroller can check it than we can always complete this
if check and related over the gamecontroller
wrong item dragged
has to be dynamic as well
drop with value
Dropped element should be related to the game controllers
if i can write come than poc is complete
emptied now
it becomes empty after my move
Not item but itembeingdragged
done the match is here
if (this.name == "box1") Controller.answerOne = drag.itemBeingDragged; if (this.name == "box2") Controller.answerTwo = drag.itemBeingDragged; if (this.name == "box3") Controller.answerThree = drag.itemBeingDragged; if (this.name == "box4") Controller.answerFour = drag.itemBeingDragged;
Concrete but here
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI;
public class controller : MonoBehaviour {
public GameObject answerOne;
public GameObject answerTwo;
public GameObject answerThree;
public GameObject answerFour;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
if(answerFour != null && answerFour.GetComponent<Text>().text=="E")
{
if (answerThree != null && answerThree.GetComponent<Text>().text == "M")
{
if (answerTwo != null && answerTwo.GetComponent<Text>().text == "O")
{
if (answerOne != null && answerOne.GetComponent<Text>().text == "C")
{
Debug.Log("Answer is a match");
}
}
}
}
}
}
after this is done we can continue with
drag event basic based on the working poc make sure if they are all lined up show debug log
Reminder....this has to be small and result oriented![image](https://user-images.githubusercontent.com/5270036/43996148-8d7b3a94-9db4-11e8-8132-ecf60d863e44.png)