static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.CullingGroupEvent o;
         o = new UnityEngine.CullingGroupEvent();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Ejemplo n.º 2
0
    static void CullingGroupEvent_previousDistance(JSVCall vc)
    {
        UnityEngine.CullingGroupEvent _this = (UnityEngine.CullingGroupEvent)vc.csObj;
        var result = _this.previousDistance;

        JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
    }
Ejemplo n.º 3
0
    static void CullingGroupEvent_hasBecomeInvisible(JSVCall vc)
    {
        UnityEngine.CullingGroupEvent _this = (UnityEngine.CullingGroupEvent)vc.csObj;
        var result = _this.hasBecomeInvisible;

        JSApi.setBooleanS((int)JSApi.SetType.Rval, (System.Boolean)(result));
    }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.CullingGroupEvent o;
			o=new UnityEngine.CullingGroupEvent();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
Ejemplo n.º 5
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.CullingGroupEvent o;
         o = new UnityEngine.CullingGroupEvent();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Ejemplo n.º 6
0
 public void OnStateChanged( CullingGroupEvent evt )
 {
     Agent agent = agents[evt.index];
     if ( evt.hasBecomeVisible ) {
         agent.in_view = true;
         agent.navmesh_agent.obstacleAvoidanceType = ObstacleAvoidanceType.GoodQualityObstacleAvoidance;
         agent.navmesh_agent.avoidancePriority = 50;
         agent.character = character_prefab.Spawn();
         agent.character.transform.SetParent( agent.transform, false );
         agent.character.transform.localPosition = Vector3.zero;
         agent.animator = agent.character.GetComponent<Animator>();
     } else if ( evt.hasBecomeInvisible ) {
         agent.in_view = false;
         agent.navmesh_agent.obstacleAvoidanceType = ObstacleAvoidanceType.LowQualityObstacleAvoidance;
         agent.navmesh_agent.avoidancePriority = 80;
         agent.character.Recycle();
     }
 }