Skip to content

Instantly share code, notes, and snippets.

View uruskan's full-sized avatar

Umut Piynar uruskan

View GitHub Profile
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Enemy_Saldiri : MonoBehaviour
{
public int saldırıGücü = 200;
public Can can;
public float menzil = 125.0f;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyMove : MonoBehaviour
{
private GameObject player;
private Transform playerpos;
private Transform playertarget;
private float enemy_donme;
class MyClass:
sick = "man"
def function(self):
print ("This is a message inside the class")
myobjectx = MyClass()
print(myobjectx.sick)
function()
@uruskan
uruskan / HumveeController.cs
Created February 11, 2017 10:09
Unity Araba Kontrolcu
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HumveeController : MonoBehaviour {
private Rigidbody rb;
public WheelCollider FR;
public WheelCollider FL;
public WheelCollider RR;
public WheelCollider RL;
void Update () {
if (Input.touchCount == 1 && Input.GetTouch (0).phase == TouchPhase.Moved) {
Vector3 touchdeltaPosition = Input.GetTouch (0).deltaPosition;
transform.Translate (-touchdeltaPosition.x * speed*Time.deltaTime, -touchdeltaPosition.y * speed*Time.deltaTime, 0);
transform.position = new Vector3(
Mathf.Clamp(transform.position.x, MIN_X, MAX_X),
Mathf.Clamp(transform.position.y, MIN_Y, MAX_Y),
Mathf.Clamp(transform.position.z, MIN_Z, MAX_Z));
}
@uruskan
uruskan / EnemyAI.cs
Created February 26, 2017 21:11
Playere Yönelme ve Hareket Etme Yapay Zeka
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EnemyAI : MonoBehaviour {
public float fpstargetdistance; //hedefe ne kadar uzak
public float enemylookdistance; //ne kadar uzaktan görecek
public float attackdistance; //ne kadar menzili var
public float enemymovementspeed;
public float damping;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ateş : MonoBehaviour {
public GameObject mermipf;
public GameObject n1;
public GameObject n2;
public GameObject n3;
public GameObject n4;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Ateş : MonoBehaviour {
public GameObject mermipf;
public GameObject n1;
public GameObject n2;
public GameObject n3;
public GameObject n4;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Turret_Control : MonoBehaviour {
public int turnspeed = 30;
public GameObject head;
public GameObject cylinder;
// Use this for initialization
using UnityEngine;
using System.Collections;
public class TankMove : MonoBehaviour
{
public float speed = 1.5f;
private Vector3 target;
private Vector3 target_rot;