コード例 #1
0
ファイル: Door.cs プロジェクト: OliviaVespera/Assets
	// Use this for initialization
	void Start () {
		GameObject playa = GameObject.FindGameObjectWithTag ("Player");
		pl = playa.GetComponent<Player>();
        anim = GetComponent<Animator>();
        doorObstacle = GetComponent<NavMeshObstacle>();
        col = GetComponent<BoxCollider>();
	}
コード例 #2
0
	protected override void Start()
	{
		numInteractuablesEnTransito = 0;

		//Carga los datos del directorio predeterminado o del de guardado si hay datos guardados
		if (System.IO.File.Exists(Manager.rutaInterDatosGuardados + ID.ToString()  + ".xml"))
		{
			datos = ObjetoDatos.LoadInterDatos(Manager.rutaInterDatosGuardados + ID.ToString()  + ".xml");
		}
		else
		{
			datos = ObjetoDatos.LoadInterDatos(Manager.rutaInterDatos + ID.ToString()  + ".xml");
		}

		//Ejecuta el metodo del padre
		base.Start();

		obstacle = GetComponent<NavMeshObstacle>();

		//Establece el nombre del interactuable
		SetNombre(datos.DevuelveNombreActual());

		if(datos.DevuelveIDTransporte() != -1)
			CrearTransporte(datos.DevuelveIDTransporte());
	}
コード例 #3
0
    // Update is called once per frame
    void Update()
    {
        RaycastHit hit;
        if (Input.GetMouseButtonDown (0))
        {
            Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);

            if (Physics.Raycast (ray, out hit, 300.0F)&& hit.transform.CompareTag ("obstacle"))
            {
                obs = hit.collider.gameObject.GetComponent<NavMeshObstacle> ();
                print (obs);
            }

        }

        print (obs);
        if (obs != null)
        {
            float amtToMoveX = Input.GetAxisRaw("Vertical") * PlayerSpeed * Time.deltaTime;

            obs.transform.Translate(Vector3.right * amtToMoveX);
            float amtToMoveZ = Input.GetAxisRaw("Horizontal") * PlayerSpeed * Time.deltaTime;

            obs.transform.Translate(Vector3.forward * -amtToMoveZ);
        }
    }
コード例 #4
0
ファイル: EnemyUnitControl.cs プロジェクト: MaddJhin/Holdout
    void Awake()
    {
        agent = GetComponent<NavMeshAgent>();
        obstacle = GetComponent<NavMeshObstacle>();
        m_Animation = GetComponentInChildren<Animation>();
        enemyAttack = GetComponent<EnemyAttack>();
        stats = GetComponent<UnitStats>();
        m_AudioSource = GetComponent<AudioSource>();
        baseAttackSpeedCache = timeBetweenAttacks;

        switch (unitType)
        {
            case EnemyTypes.Minion:
                selectedAction = "Punch";
                break;

            case EnemyTypes.Brute:
                selectedAction = "Slam";
                break;

            case EnemyTypes.Evoker:
                selectedAction = "Shoot";
                break;

            case EnemyTypes.Bob:
                selectedAction = "Explode";
                break;

            default:
                break;
        }
    }
コード例 #5
0
 void Start()
 {
     if (_bull != null) {
         _Charge = _bull.GetComponent<BullBehaviour> ();
     }
         _MeshObstakels  = GetComponent<NavMeshObstacle> ();
 }
コード例 #6
0
 static public int constructor(IntPtr l)
 {
     UnityEngine.NavMeshObstacle o;
     o = new UnityEngine.NavMeshObstacle();
     pushObject(l, o);
     return(1);
 }
コード例 #7
0
ファイル: forestHound.cs プロジェクト: hydrater/TLH
	void Start () 
	{
		waypoints = GameObject.Find("Hound waypoints");
		agent = proxy.GetComponent<NavMeshAgent>();
		obstacle = proxy.GetComponent<NavMeshObstacle>();
		anim = model.GetComponent<Animator>();
		target = waypoints.transform.GetChild(2);
	}
コード例 #8
0
 static public int set_velocity(IntPtr l)
 {
     UnityEngine.NavMeshObstacle o = (UnityEngine.NavMeshObstacle)checkSelf(l);
     UnityEngine.Vector3         v;
     checkType(l, 2, out v);
     o.velocity = v;
     return(0);
 }
コード例 #9
0
ファイル: TrapScript.cs プロジェクト: pixelshade/medusaslife
 // Use this for initialization
 void Start()
 {
     _navMeshObstacle = GetComponent<NavMeshObstacle>();
     _navMeshObstacle.enabled = false;
     var anim = GetComponent<Animation>();
     anim["Up Down"].wrapMode = WrapMode.Once;
     anim.Play("Up Down");
 }
コード例 #10
0
 // Use this for initialization
 void Start()
 {
     startPos = new Vector3 (startX, startY, startZ);
     endPos = new Vector3 (endX, endY, endZ);
     transform.position = startPos;
     travelState = 0;
     nav = GetComponent<NavMeshObstacle> ();
 }
コード例 #11
0
    static public int set_carvingMoveThreshold(IntPtr l)
    {
        UnityEngine.NavMeshObstacle o = (UnityEngine.NavMeshObstacle)checkSelf(l);
        float v;

        checkType(l, 2, out v);
        o.carvingMoveThreshold = v;
        return(0);
    }
コード例 #12
0
    static public int set_radius(IntPtr l)
    {
        UnityEngine.NavMeshObstacle o = (UnityEngine.NavMeshObstacle)checkSelf(l);
        float v;

        checkType(l, 2, out v);
        o.radius = v;
        return(0);
    }
コード例 #13
0
    static public int set_carving(IntPtr l)
    {
        UnityEngine.NavMeshObstacle o = (UnityEngine.NavMeshObstacle)checkSelf(l);
        bool v;

        checkType(l, 2, out v);
        o.carving = v;
        return(0);
    }
コード例 #14
0
        private void _getObstacle()
        {
            GameObject go = Fsm.GetOwnerDefaultTarget(gameObject);
            if (go == null)
            {
                return;
            }

            _obstacle =  go.GetComponent<NavMeshObstacle>();
        }
コード例 #15
0
ファイル: Units.cs プロジェクト: kthierydezky/LTDU
 public virtual void Start()
 {
     agent = GetComponent<NavMeshAgent>();
     obstacle = GetComponent<NavMeshObstacle>();
     obstacle.enabled = false;
     animator = GetComponent<Animator>();
     aggroRadius = GetComponentInChildren<AggroRadius>();
     InitStat();
     InitEventMessenger();
 }
コード例 #16
0
 void Awake()
 {
     player = GameObject.Find("Player");
     playerHealth = player.GetComponent <PlayerHealth>();
     enemyHealth = GetComponent <EnemyHealth>();
     nav = GetComponent <NavMeshAgent>();
     obstacle = GetComponent<NavMeshObstacle>();
     navEnabled = true;
     animator = GetComponent<Animator>();
     characterController = GetComponent<CharacterController>();
 }
コード例 #17
0
 static public int get_velocity(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.velocity);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #18
0
 static public int get_shape(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         pushEnum(l, (int)self.shape);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #19
0
 static public int get_shape(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.shape);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #20
0
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.NavMeshObstacle o;
			o=new UnityEngine.NavMeshObstacle();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
コード例 #21
0
    // Use this for initialization
    void Start()
    {
        agent = GetComponent<NavMeshAgent> ();
        obstacle = GetComponent<NavMeshObstacle> ();

        AgentToObstacle ();

        mat = GetComponent<Renderer>().material;
        mat.SetColor("_Color", Color.magenta);

        //agent.SetDestination(new Vector3(20, 1, 20));
    }
コード例 #22
0
 static public int get_carvingMoveThreshold(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.carvingMoveThreshold);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #23
0
 static public int get_velocity(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         pushValue(l, self.velocity);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #24
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle o;
         o = new UnityEngine.NavMeshObstacle();
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #25
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle o;
         o = new UnityEngine.NavMeshObstacle();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #26
0
 static public int constructor(IntPtr l)
 {
     LuaDLL.lua_remove(l, 1);
     UnityEngine.NavMeshObstacle o;
     if (matchType(l, 1))
     {
         o = new UnityEngine.NavMeshObstacle();
         pushObject(l, o);
         return(1);
     }
     LuaDLL.luaL_error(l, "New object failed.");
     return(0);
 }
コード例 #27
0
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle o;
         o=new UnityEngine.NavMeshObstacle();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
コード例 #28
0
 static public int set_shape(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle      self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         UnityEngine.NavMeshObstacleShape v;
         checkEnum(l, 2, out v);
         self.shape = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #29
0
 static public int set_radius(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.radius = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #30
0
 static public int set_radius(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.radius = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #31
0
 static public int set_velocity(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         UnityEngine.Vector3         v;
         checkType(l, 2, out v);
         self.velocity = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #32
0
 static public int set_velocity(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         UnityEngine.Vector3         v;
         checkType(l, 2, out v);
         self.velocity = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #33
0
 static public int set_carveOnlyStationary(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.carveOnlyStationary = v;
         return(0);
     }
     catch (Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return(0);
     }
 }
コード例 #34
0
 static public int set_carveOnlyStationary(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.carveOnlyStationary = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #35
0
 static public int set_shape(IntPtr l)
 {
     try {
         UnityEngine.NavMeshObstacle      self = (UnityEngine.NavMeshObstacle)checkSelf(l);
         UnityEngine.NavMeshObstacleShape v;
         checkEnum(l, 2, out v);
         self.shape = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #36
0
 static void NavMeshObstacle_velocity(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.NavMeshObstacle _this = (UnityEngine.NavMeshObstacle)vc.csObj;
         var result = _this.velocity;
         JSApi.setVector3S((int)JSApi.SetType.Rval, result);
     }
     else
     {
         UnityEngine.Vector3         arg0  = (UnityEngine.Vector3)JSApi.getVector3S((int)JSApi.GetType.Arg);
         UnityEngine.NavMeshObstacle _this = (UnityEngine.NavMeshObstacle)vc.csObj;
         _this.velocity = arg0;
     }
 }
コード例 #37
0
 static void NavMeshObstacle_carving(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.NavMeshObstacle _this = (UnityEngine.NavMeshObstacle)vc.csObj;
         var result = _this.carving;
         JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
     }
     else
     {
         System.Boolean arg0 = (System.Boolean)JSApi.getBooleanS((int)JSApi.GetType.Arg);
         UnityEngine.NavMeshObstacle _this = (UnityEngine.NavMeshObstacle)vc.csObj;
         _this.carving = arg0;
     }
 }
コード例 #38
0
 static void NavMeshObstacle_shape(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.NavMeshObstacle _this = (UnityEngine.NavMeshObstacle)vc.csObj;
         var result = _this.shape;
         JSApi.setEnum((int)JSApi.SetType.Rval, (int)result);
     }
     else
     {
         UnityEngine.NavMeshObstacleShape arg0  = (UnityEngine.NavMeshObstacleShape)JSApi.getEnum((int)JSApi.GetType.Arg);
         UnityEngine.NavMeshObstacle      _this = (UnityEngine.NavMeshObstacle)vc.csObj;
         _this.shape = arg0;
     }
 }
コード例 #39
0
 static void NavMeshObstacle_radius(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.NavMeshObstacle _this = (UnityEngine.NavMeshObstacle)vc.csObj;
         var result = _this.radius;
         JSApi.setSingle((int)JSApi.SetType.Rval, (System.Single)(result));
     }
     else
     {
         System.Single arg0 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg);
         UnityEngine.NavMeshObstacle _this = (UnityEngine.NavMeshObstacle)vc.csObj;
         _this.radius = arg0;
     }
 }
コード例 #40
0
ファイル: Door.cs プロジェクト: lim3s/ninjarobbers
	void Start () {
		on = true;

		anim = GetComponent<Animator> ();
		anim.SetBool ("Open", true);

		Vector3 temp = navObjectLocation.position;
		Vector3 newPos = new Vector3(temp.x, temp.z, temp.y);
		navObject.position = newPos;

		navObstacle = navObject.GetComponent<NavMeshObstacle> ();

		// Fix for unity 5.2 network animator
		//for (int i = 0; i < GetComponent<Animator> ().parameterCount; i++)
		//	GetComponent<NetworkAnimator> ().SetParameterAutoSend (i, true);
	}
コード例 #41
0
	public Vector3 nextPointMarker = Vector3.zero; // just for nav debugging
	
	void Awake()
	{
		m_navMeshAgent = GetComponent<NavMeshAgent>();
		m_navMeshObstacle = GetComponent<NavMeshObstacle>();
		if (m_navMeshAgent != null){
			defaultSpeed = m_navMeshAgent.speed;
//			m_navMeshAgent.autoBraking = false; // this seems to hurt a lot more than it helps.
//			m_navMeshAgent.stoppingDistance = 0.1f;
		}
		lastAvoidCheckTime = Time.time;
		//Time.timeScale = 0.25f;
		if (headingTransform == null){
			LookAtController model = GetComponentInChildren(typeof(LookAtController)) as LookAtController;
			if (model != null) headingTransform = model.transform;			
		}
	}
コード例 #42
0
    void Start()
    {
        controller = GetComponent<NavMeshAgent>();
        enemyAnimation = GetComponent<Animator>();
        combatManager = GetComponent<EnemyCombatManager>();
        photonView = GetComponent<PhotonView>();
        obstacle = GetComponent<NavMeshObstacle>();
        controller.avoidancePriority = Random.Range(0, 99);
        
        //player = GameObject.FindGameObjectWithTag("Player");
        initialPosition = transform.position;
        controller.stoppingDistance = chaseStopDistance;

        if(PhotonNetwork.isMasterClient)
        {
            StartCoroutine(Movement());
        }
    }
コード例 #43
0
ファイル: Building.cs プロジェクト: JJJohan/RTS
        public Building(Properties a_properties, Mesh a_mesh, Texture2D a_texture)
            : base(a_properties.ID, a_properties.name)
        {
            // Init properties
            m_totalHealth = a_properties.health;
            m_power = a_properties.power;
            m_cost = a_properties.cost;
            m_buildTime = a_properties.buildTime;
            m_miniSize = a_properties.miniSize;
            m_type = Type.DEFAULT;
            m_gameObject.tag = "Building";
            m_gameObject.layer = 10;

            base.Init(a_mesh, a_texture);

            // Nav mesh obstacle
            m_obstacle = m_gameObject.AddComponent<NavMeshObstacle>();
            m_obstacle.radius = m_radius;
            m_obstacle.height = m_mesh.mesh.bounds.size.y;
        }
コード例 #44
0
    void Start()
    {
        agent            = proxy.GetComponent< NavMeshAgent >();
        obstacle         = proxy.GetComponent< NavMeshObstacle >();
        //obstacle.enabled = true;

        LOS              = 15.0f;
        damage           = 25.0f;
        reDetect         = 0.5f;
        timeToAttack     = 0.5f;
        mustAttack       = true;
        lifeToBack       = 50;
        life             = 100.0f;
        lifeMax          = life;
        loot             = 75.0f;
        distanceToAttack = 10.0f; // Distance pour un CAC

        rooms            = GameObject.FindGameObjectsWithTag ("RoomTAG");
        target = null;
    }
コード例 #45
0
    // Update is called once per frame
    void Update()
    {
        RaycastHit hit;
        //float moveHorizontal = Input.GetAxis("horizontal");
        //float moveVertical = Input.GetAxis("vertical");

        //Select the agent to move and move
        if (Input.GetMouseButtonDown(0))
        {
            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
            //select Agent
            if (Physics.Raycast(ray, out hit, 3000))
            {
                if(hit.transform.CompareTag("capsule"))
                {
                    agent = hit.collider.gameObject.GetComponent<NavMeshAgent>();
                }
                if (agent != null)
                {
                    agent.SetDestination(hit.point);
                }
                if (hit.transform.CompareTag("obstacle"))
                {
                    //print("Obstacle");
                    obstacle = hit.collider.gameObject.GetComponent<NavMeshObstacle>();
                }
                if (obstacle != null)
                {
                    if (Input.GetKeyDown(KeyCode.LeftArrow))
                    {
                        print("Obstacle not null");
                        obstacle.transform.Translate(1, 0, 0);
                        //obstacle.transform.position += new Vector3(1.0f, 0.0f, 0.0f);
                    }
                }
            }

        }
    }
コード例 #46
0
    private void Start()
    {
        m_SpeedId = Animator.StringToHash("Speed");

        LifeManager.AddToSceneObjList(gameObject);
        //Init Components
        m_NavMeshPath = new NavMeshPath();
        m_Animator = this.gameObject.GetComponent<Animator>();
        m_NavObs = this.gameObject.GetComponent<NavMeshObstacle>();
        //if (m_NavObs != null)
        //{
        //    m_NavObs.shape = NavMeshObstacleShape.Capsule;
        //    m_NavObs.radius = .5f;
        //}
        if (m_Animator == null)
        {
            Debuger.LogWarning("Animator Not Found");
        }
        //m_NavAgent = this.gameObject.GetComponentInChildren<NavMeshAgent>();
        //if (m_NavAgent == null)
        //{
        //    Debuger.LogError("NavMeshAgent Not Found");
        //    return;
        //}
        //reset char pos
        NavMeshHit hit;
        if (NavMesh.SamplePosition(this.gameObject.transform.position, out hit, 5.0f, NavMesh.AllAreas))
        {
            this.gameObject.transform.position = hit.position;
        }

        CharSettingScript setting = gameObject.GetComponent<CharSettingScript>();
        if (setting != null)
        {
            m_MaxSpeed = setting.DefaultSpeed;
        }

    }
コード例 #47
0
	// Use this for initialization
	void Start () {
        if (e == null)
            e = gameObject.AddComponent<NavMeshObstacle>();
        e.enabled = false;
    }
コード例 #48
0
    public IEnumerator nextframe()
    {
        yield return null;

        if (e == null)
            e = gameObject.AddComponent<NavMeshObstacle>();
        e.enabled = true;
        e.carving = true;
        e.size = new Vector3(1, 2, 1);
    }
コード例 #49
0
 void Awake()
 {
     navMeshAgent = GetComponent<NavMeshAgent>();
     navMeshObstacle = GetComponent<NavMeshObstacle>();
 }
コード例 #50
0
ファイル: scr_item.cs プロジェクト: MikeGonthier/LudumDare33
 // Use this for initialization
 void Start()
 {
     grabbed = false;
     obstacle = GetComponentInChildren<NavMeshObstacle>();
     originalY = this.transform.position.y;
 }
コード例 #51
0
    // Use this for initialization
    void Start()
    {
        if(pathManager == null) {
            pathManager = GameObject.Find (vars.path_manager_name).GetComponent<wp_manager>();
        }

        if(baseManager == null) {
            baseManager = GameObject.Find (vars.base_name).GetComponent<base_manager>();
        }

        if(workerManager == null) {
            workerManager = GameObject.Find (vars.worker_manager_name).GetComponent<WorkerManager>();
        }

        workerManager.addWorker(this);
        navMeshAgent = GetComponent<NavMeshAgent>();
        navMeshObstacle = GetComponent<NavMeshObstacle>();
    }
コード例 #52
0
        /// <summary>
        /// Initializes all required variables.
        /// </summary>
        protected void InitializeNavAgentBase()
        {
            if(NavAgent == null)
                NavAgent = this.GetComponent<NavMeshAgent>();
            if(NavObstacle == null)
                NavObstacle = this.GetComponent<NavMeshObstacle>();
            if(m_transformComponent == null)
                m_transformComponent = this.GetComponent<Transform>();

            SetPositionOnNavMesh();
        }
コード例 #53
0
 static public int get_radius(IntPtr l)
 {
     UnityEngine.NavMeshObstacle o = (UnityEngine.NavMeshObstacle)checkSelf(l);
     pushValue(l, o.radius);
     return(1);
 }
コード例 #54
0
 static public int get_height(IntPtr l)
 {
     UnityEngine.NavMeshObstacle o = (UnityEngine.NavMeshObstacle)checkSelf(l);
     pushValue(l, o.height);
     return(1);
 }
コード例 #55
0
 static public int get_velocity(IntPtr l)
 {
     UnityEngine.NavMeshObstacle o = (UnityEngine.NavMeshObstacle)checkSelf(l);
     pushValue(l, o.velocity);
     return(1);
 }
コード例 #56
0
 static public int get_carvingMoveThreshold(IntPtr l)
 {
     UnityEngine.NavMeshObstacle o = (UnityEngine.NavMeshObstacle)checkSelf(l);
     pushValue(l, o.carvingMoveThreshold);
     return(1);
 }
コード例 #57
0
 // Use this for initialization
 void Start()
 {
     agent = null; //GetComponent<NavMeshAgent>();
     obstacle = null;
     anim = null;
 }
コード例 #58
0
ファイル: GateStuff.cs プロジェクト: RarCeth/SystemShutdown
 void Start()
 {
     gate = GetComponent<NavMeshObstacle>();
     GetComponent<NavMeshObstacle>().carving = true;
 }
コード例 #59
0
    // Use this for initialization
    void Start()
    {
        var player = GameObject.FindGameObjectWithTag("Player");
        target_position = player.transform.position;
        target_direction = Vector3.Normalize(target_position - transform.position);

        navmesh = GetComponent<NavMeshObstacle>();
        collider = GetComponent<Collider>();

        navmesh.enabled = false;
        collider.enabled = false;
    }