Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void OnCollisionEnter(Collision col)
- {
- if (col.gameObject.tag == "plat")
- {
- GameObject.Find("player/Camera/senjata").GetComponent<senjata>().jml_peluru -= 1;
- col.gameObject.GetComponent<ScriptBalok>().Moved = !col.gameObject.GetComponent<ScriptBalok>().Moved;
- if (col.gameObject.GetComponent<ScriptBalok>().Back == true)
- {
- GameObject.Find("player/Camera/senjata").GetComponent<senjata>().jml_peluru += 2;
- }
- Destroy(gameObject);
- }
- if (col.gameObject.tag == "Wall")
- {
- Destroy(gameObject);
- }
- if (col.gameObject.tag == "floor")
- {
- Destroy(gameObject);
- }
- if (col.gameObject.tag == "death floor")
- {
- Destroy(gameObject);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement