using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.InputSystem;
public class TapMoving : MonoBehaviour
{
public Camera cam;
public Variables variables;
public Vector2 vector2;
public Vector2 playerVector;
public GameObject objectThis;
public void Tap(InputAction.CallbackContext context)
{
Debug.Log(Mouse.current.position.x.ReadValue());
objectThis.transform.position = cam.ScreenToWorldPoint (new Vector3(Mouse.current.position.x.ReadValue(), Mouse.current.position.y.ReadValue(), 1));
}
public int inWordCount;
public int numberInArray = 0;
public int[] wordsCount;
public GameObject[] Letters;
public GameObject[] TakeLetters;
public bool[] IsLetterActive;
private void Start()
{
for (int i = 0; i < IsLetterActive.Length; i++)
{
IsLetterActive[i] = false;
}
}
private void OnTriggerEnter2D(Collider2D col)
{
if (TakeLetters[numberInArray] == null)
{
TakeLetters[numberInArray] = col.gameObject;
}
else
{
while (TakeLetters[numberInArray] != null)
{
numberInArray++;
if (TakeLetters[numberInArray] == null)
{
TakeLetters[numberInArray] = col.gameObject;
}
}
}
if (numberInArray < Letters.Length)
{
numberInArray++;
}
}
private void OnPress(InputValue value)
{
if (value.isPressed)
{
}
else
{
for (int inNumber = 0; inNumber < wordsCount.Length; inNumber++)
{
for (int InLetters = 0; InLetters < TakeLetters.Length; InLetters++)
{
inWordCount = wordsCount[inNumber];
while (inWordCount <= 0)
{
if (TakeLetters[InLetters])
{
}
}
}
}
}
}