rifaterdemsahin / aif

Adaptive Intelligence Framework
5 stars 7 forks source link

drag_event poc basic #139

Open rifaterdemsahin opened 6 years ago

rifaterdemsahin commented 6 years ago

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

rifaterdemsahin commented 6 years ago

start error after the copy paste image

rifaterdemsahin commented 6 years ago

updated namespaces image

rifaterdemsahin commented 6 years ago

this is definitely a poc...As I am not using the prefabs to achieve this goal

image

rifaterdemsahin commented 6 years ago

how to put an event into this box now comes into the question image

rifaterdemsahin commented 6 years ago

our code still refers to the old code not to the new one image

rifaterdemsahin commented 6 years ago

rebinding worked we also have the drop image

it locks with drop image

making prefabs will ease our problems...

rifaterdemsahin commented 6 years ago

Drop is a unity feature image

rifaterdemsahin commented 6 years ago

Drag and Drop are related to each other image

rifaterdemsahin commented 6 years ago

Drag has more events image

rifaterdemsahin commented 6 years ago

no yak shaving.... focus on the success of come in order /....debug out success

rifaterdemsahin commented 6 years ago

fastest way.....go to drop event and find out the letter...and compare it to C

rifaterdemsahin commented 6 years ago

focused image image

it looks like one at a time dragged image

rifaterdemsahin commented 6 years ago

Poc is coming to the end...having smaller scope is vital at the design image

If the gamecontroller can check it than we can always complete this image

rifaterdemsahin commented 6 years ago

if check and related over the gamecontroller image

rifaterdemsahin commented 6 years ago

wrong item dragged image

has to be dynamic as well image

rifaterdemsahin commented 6 years ago

drop with value image

rifaterdemsahin commented 6 years ago

Dropped element should be related to the game controllers image

if i can write come than poc is complete image

rifaterdemsahin commented 6 years ago

emptied now image

it becomes empty after my move

rifaterdemsahin commented 6 years ago

image

Not item but itembeingdragged image

rifaterdemsahin commented 6 years ago

done the match is here image

rifaterdemsahin commented 6 years ago

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");

                }
            }
        }

    }
}

}

rifaterdemsahin commented 6 years ago

after this is done we can continue with image