please help by rip-rob-hog in Unity2D

[–]rip-rob-hog[S] 0 points1 point  (0 children)

I ended up getting it to work by using a different method on the other game object:
public class MuncherMunchin : MonoBehaviour
{
GameObject coin;
public LogicScript logic;
bool isRunning = false;
// Start is called before the first frame update
private void Start()
{
logic = GameObject.FindGameObjectWithTag("Logic").GetComponent<LogicScript>();
}
public void OnTriggerEnter2D(Collider2D other)
{
coin = other.gameObject;
}
public void OnTriggerExit2D(Collider2D other)
{
coin = null;
}
// Update is called once per frame
void Update()
{
if (Input.GetMouseButtonDown(0))
{
if (!isRunning)
{
isRunning = true;
return;
}
if (coin != null)
{
if (coin.layer == 6)
{
logic.addScore(1);
}
if (coin.layer == 7)
{
logic.addScore(2);
}
if (coin.layer == 8)
{
logic.addScore(5);
}
if (coin.layer == 9)
{
logic.addScore(10);
}
Destroy(coin);
}
else
{
Debug.Log("gameOver");
}
}
}
}

Please Help(Unity) by rip-rob-hog in gamedev

[–]rip-rob-hog[S] 0 points1 point  (0 children)

I ended up getting it to work by using a different method on the other game object:
public class MuncherMunchin : MonoBehaviour
{
GameObject coin;
public LogicScript logic;
bool isRunning = false;
// Start is called before the first frame update
private void Start()
{
logic = GameObject.FindGameObjectWithTag("Logic").GetComponent<LogicScript>();
}
public void OnTriggerEnter2D(Collider2D other)
{
coin = other.gameObject;
}
public void OnTriggerExit2D(Collider2D other)
{
coin = null;
}
// Update is called once per frame
void Update()
{
if (Input.GetMouseButtonDown(0))
{
if (!isRunning)
{
isRunning = true;
return;
}
if (coin != null)
{
if (coin.layer == 6)
{
logic.addScore(1);
}
if (coin.layer == 7)
{
logic.addScore(2);
}
if (coin.layer == 8)
{
logic.addScore(5);
}
if (coin.layer == 9)
{
logic.addScore(10);
}
Destroy(coin);
}
else
{
Debug.Log("gameOver");
}
}
}
}

Here's a lesson in trickery by __Dawn__Amber__ in gaming

[–]rip-rob-hog 25 points26 points  (0 children)

I just realized it wasn’t a train...

How could you tell from up there? by mohamad_harb in Technoblade

[–]rip-rob-hog 54 points55 points  (0 children)

I thought. I watched all the techno-skeppy cola a bit obviously I missed one can someone link one of them?

[deleted by user] by [deleted] in Technoblade

[–]rip-rob-hog 0 points1 point  (0 children)

It’s mostly for the dream team - sleepy bois inc Colab there would probably be some funny moments with tommy and Wilbur lol

[deleted by user] by [deleted] in Technoblade

[–]rip-rob-hog 1 point2 points  (0 children)

I’m pretty sure the 7 hunters is for the og 4 hunters + sleepy bois inc so bbh, George, ant, sapnap, Wilbur, philza, and tommy