Exemple #1
0
 void Start()
 {
     anim = GetComponent<Animator>();
     controller = GetComponent<CharacterController>();
     oldPosX = transform.position.x;
     oldPosZ = transform.position.z;
 }
Exemple #2
0
        void Awake() {
            instance = this;
            characterController = GetComponent<CharacterController>() as CharacterController;

            this._currentBlock = null;
            this._currentDirection = PlayerInfo.MovementDirection.NONE;
        }
 void Awake()
 {
     playerController = GetComponent<CharacterController>();
     entityBehaviour = GetComponent<DaggerfallEntityBehaviour>();
     entityBehaviour.OnSetEntity += EntityBehaviour_OnSetEntity;
     mainCamera = GameManager.Instance.MainCamera;
 }
        // Use this for initialization
        private void Start()
        {
            if (PlayerPrefs.GetInt("Nb change", 0) == 1)
                Destroy(change1);
            else if (PlayerPrefs.GetInt("Nb change", 0) == 2)
            {
                Destroy(change1);
                Destroy(change2);
            }
            DestroyChange();
            Volume.value = 1;
            m_CharacterController = GetComponent<CharacterController>();
            m_Camera = Camera.main;
            m_OriginalCameraPosition = m_Camera.transform.localPosition;
            m_FovKick.Setup(m_Camera);
            m_HeadBob.Setup(m_Camera, m_StepInterval);
            m_StepCycle = 0f;
            m_NextStep = m_StepCycle/2f;
            m_Jumping = false;
            m_AudioSource = GetComponent<AudioSource>();
			m_MouseLook.Init(transform , m_Camera.transform);
            Listener = GetComponentInChildren<AudioListener>();
            if (Application.loadedLevel == 1)
                m_CharacterController.transform.position = new Vector3(PlayerPrefs.GetFloat("Xpos", 21.9f), PlayerPrefs.GetFloat("Ypos",1),PlayerPrefs.GetFloat("Zpos", -23.32f));
            m_CharacterController.transform.rotation= new Quaternion(PlayerPrefs.GetFloat("Xrot", 0), PlayerPrefs.GetFloat("Yrot", 0), PlayerPrefs.GetFloat("Zrot", 0),0);
        }
 void Awake()
 {
     controller = GetComponent<CharacterController>();
     smoothCamera = GetComponentInChildren<SmoothCameraWithBumper>();
     audioSource = GetComponentInChildren<AudioSource>();
     anim = GetComponent<Animation>();
 }
        private GameObject previousGo; // remember so we can get new controller only when it changes.

        #endregion Fields

        #region Methods

        public override void OnUpdate()
        {
            var go = Fsm.GetOwnerDefaultTarget(gameObject);
            if (go == null) return;

            if (go != previousGo)
            {
                controller = go.GetComponent<CharacterController>();
                previousGo = go;
            }

            if (controller != null)
            {
                var move = space == Space.World ? moveVector.Value : go.transform.TransformDirection(moveVector.Value);

                if (perSecond.Value)
                {
                    controller.Move(move * Time.deltaTime);
                }
                else
                {
                    controller.Move(move);
                }
            }
        }
        // Use this for initialization
        private void Start()
        {
        	if (Application.loadedLevelName == "Sanctuary")
        	{
        		Sprint = true;
        		m_WalkSpeed = 5;
        		m_RunSpeed = 10;
        	}
        	else
        	{
				m_WalkSpeed = GetComponent<combatStats>().walkSpeed;
				m_RunSpeed = GetComponent<combatStats>().runSpeed;
				m_CrouchSpeed = GetComponent<combatStats>().crouchSpeed;
        	}
            m_CharacterController = GetComponent<CharacterController>();
            m_Camera = Camera.main;
            m_OriginalCameraPosition = m_Camera.transform.localPosition;
            m_FovKick.Setup(m_Camera);
            m_HeadBob.Setup(m_Camera, m_StepInterval);
            m_StepCycle = 0f;
            m_NextStep = m_StepCycle/2f;
            m_Jumping = false;
            m_AudioSource = GetComponent<AudioSource>();
			m_MouseLook.Init(transform , m_Camera.transform);
        }
 public override void OnUpdate()
 {
     GameObject ownerDefaultTarget = base.Fsm.GetOwnerDefaultTarget(this.gameObject);
     if (ownerDefaultTarget == null)
     {
         return;
     }
     if (ownerDefaultTarget != this.previousGo)
     {
         this.controller = ownerDefaultTarget.GetComponent<CharacterController>();
         this.previousGo = ownerDefaultTarget;
     }
     if (this.controller != null)
     {
         Vector3 vector = (this.space != Space.World) ? ownerDefaultTarget.transform.TransformDirection(this.moveVector.Value) : this.moveVector.Value;
         if (this.perSecond.Value)
         {
             this.controller.Move(vector * Time.deltaTime);
         }
         else
         {
             this.controller.Move(vector);
         }
     }
 }
        void Start()
        {
            _characterController = GetComponent<CharacterController>();

            StartCoroutine(RandomInputJump());
            StartCoroutine(RandomInputSpeed());
        }
        Vector3 movement; // The vector to store the direction of the player's movement.

        #endregion Fields

        #region Methods

        void Awake()
        {
            // Create a layer mask for the floor layer.
            floorMask = LayerMask.GetMask ("Floor");

            // Set up references.
            controller = this.GetComponent<CharacterController>();
        }
 void Start()
 {
     anim = GetComponent<Animator>();
     cont = GetComponent<CharacterController>();
     currentMovement = GetComponent<AIPath>();
     isShiftDown = false;
     slowMoTime = 0f;
 }
		public void Start () {
			guns = GetComponentsInChildren<GunShooting>();
			seeker = GetComponent<Seeker>();
			controller = GetComponent<CharacterController>();
			animator = GetComponentInChildren<Animator>();
			if (target != null)
				target.transform.position = transform.position;
		}
Exemple #13
0
        /** Use this for initialization */
        public void Start () {
            seeker = GetComponent<Seeker>();
            controller = GetComponent<CharacterController>();
            navmeshController = GetComponent<NavmeshController>();
		
            tr = transform;
            Repath ();
        }
Exemple #14
0
        void Awake() {
            instance = this;
            characterController = GetComponent<CharacterController>() as CharacterController;

            this.indicationTexture = this.indication.GetComponent<AnimateTextureSheet>() as AnimateTextureSheet;
            this._currentBlock = null;
            this._currentDirection = PlayerInfo.MovementDirection.NONE;            
        }
Exemple #15
0
		public override void OnEnter ()
		{
			charCtrl = startingObj.Value.GetComponent<CharacterController>();
			DoSphereCast ();
			if (!everyFrame) {
				Finish();			
			}
		}
Exemple #16
0
 public override void OnStart()
 {
     var currentGameObject = GetDefaultGameObject(targetGameObject.Value);
     if (currentGameObject != prevGameObject) {
         characterController = currentGameObject.GetComponent<CharacterController>();
         prevGameObject = currentGameObject;
     }
 }
Exemple #17
0
 public override void Activate(BTDatabase database)
 {
     base.Activate(database);
     _trans = database.transform;
     seeker = _trans.GetComponent<Seeker>();
     controller = _trans.GetComponent<CharacterController>();
     seeker.pathCallback += OnPathComplete;
 }
        float camRayLength = 100f;          // The length of the ray from the camera into the scene.

        void Awake ()
        {

            // Set up references.
            anim = GetComponent <Animator> ();
			character = GetComponent<CharacterController>();
            //playerRigidbody = GetComponent <Rigidbody> ();
        }
        // Use this for initialization
        private void Start()
        {
            m_CharacterController = GetComponent<CharacterController>();
            m_OriginalCameraPosition = m_Camera.transform.localPosition;
            m_StepCycle = 0f;
            m_NextStep = m_StepCycle/2f;
            m_AudioSource = GetComponent<AudioSource>();
			m_MouseLook.Init(transform , m_Camera.transform);
        }
 void Awake()
 {
     _aiController = GameObject.FindGameObjectWithTag ("AIPlayer").GetComponent<CharacterController> ();
     _movement = gameObject.AddComponent<AI.AIPlayerMovement> ();
     _slash = gameObject.AddComponent<AI.AISlash> ();
     _relics = gameObject.AddComponent<AI.AIRelicManager> ();
     _health = gameObject.AddComponent<AI.AIHealth> ();
     _health.TotalStuff ();
 }
		// Use this for initialization
		private void Start () {
			m_CharacterController = GetComponent<CharacterController>();
			m_Camera = Camera.main;
			m_StepCycle = 0f;
			m_NextStep = m_StepCycle / 2f;
			m_Jumping = false;
			m_AudioSource = GetComponent<AudioSource>();
			m_MouseLook.Init(transform, m_Camera.transform);
		}
 void TryToFindPlayer()
 {
     // Obtem a instancia do objeto do jogador
     playerRefence = FindObjectOfType<CharacterController> ();
     if(playerRefence != null) {
         // Set current position camera to player
         transform.position = GetPlayerPosition ();
     }
 }
		/// <summary>
		/// 	Returns either point1 or point2 of the capsule.
		/// </summary>
		/// <returns>The point.</returns>
		/// <param name="extends">Extends.</param>
		/// <param name="point1">If set to <c>true</c> point1.</param>
		private static Vector3 GetPointGeneric(CharacterController extends, bool point1)
		{
			float scalar = point1 ? -1.0f : 1.0f;
			float distance = (extends.height / 2.0f) - extends.radius;

			Vector3 output = extends.center + scalar * Vector3.up * distance;
			output = extends.transform.TransformPoint(output);

			return output;
		}
Exemple #24
0
 public void Awake()
 {
     playerController = GetComponent<Widget_Controller>();
     controller = GetComponent<CharacterController>();
     aSource = GetComponent<AudioSource>();
     animationState = GetComponent<Widget_Animation>();
     anim = GetComponent<Animation>();
     bodyMesh = GameObject.Find("Body").GetComponent<SkinnedMeshRenderer>();
     wheelMesh = GameObject.Find("Wheels").GetComponent<SkinnedMeshRenderer>();
 }
		// Use this for initialization
		void Start () {

			controller = GetComponent<CharacterController> ();

			// Determine if this is a bunny
			if ( GetComponent<BunnyControlBehavior> () ) {
				isBunny = true;
			}

		}
 public void Start()
 {
     Controller = gameObject.AddComponent<CharacterController>();
     Controller.radius = .25f;
     Controller.height = 1;
     MainCamera = Camera.main;
     MainCamera.nearClipPlane = .1f;
     gameObject.AddComponent<MouseLook>();
     BouncyMaterial = (PhysicMaterial)Resources.Load("BouncySphereMaterial");
 }
        bool isSinking;                             // Whether the enemy has started sinking through the floor.


        void Awake ()
        {
            // Setting up the references.
            anim = GetComponent <Animator> ();
            enemyAudio = GetComponent <AudioSource> ();
            hitParticles = GetComponentInChildren <ParticleSystem> ();
			character = GetComponent <CharacterController> ();

            // Setting the current health when the enemy first spawns.
            currentHealth = startingHealth;
        }
        void Start()
        {
            GetComponent<Camera>().farClipPlane = 150;

            transform.position = new Vector3(1, 10, 1);

            _cc = gameObject.AddComponent<CharacterController>();
            _cc.radius = 0.1f;
            _cc.height = 0.4f;
            _cc.center = new Vector3(0, 0, 0);
        }
        public AStarAgentAdapter( GameObject gameObject )
            : base(gameObject)
        {
            speed = 150;
            collider = gameObject.GetComponent<CapsuleCollider>();
            characterController = gameObject.GetComponent<CharacterController>();
            seeker = gameObject.AddComponent<Seeker>() as Seeker;
            gameObject.AddComponent<SimpleSmoothModifier>();

            seeker.pathCallback += pathCallback;
        }
Exemple #30
0
 static public int get_enableOverlapRecovery(IntPtr l)
 {
     try {
         UnityEngine.CharacterController self = (UnityEngine.CharacterController)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.enableOverlapRecovery);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #31
0
 static public int get_collisionFlags(IntPtr l)
 {
     try {
         UnityEngine.CharacterController self = (UnityEngine.CharacterController)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.collisionFlags);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 // Use this for initialization
 private void Start()
 {
     _characterController = GetComponent<CharacterController>();
     _camera = Camera.main;
     _originalCameraPosition = _camera.transform.localPosition;
     _cameraRefocus = new CameraRefocus(_camera, transform, _camera.transform.localPosition);
     _fovKick.Setup(_camera);
     _headBob.Setup(_camera, _stepInterval);
     _stepCycle = 0f;
     _nextStep = _stepCycle/2f;
     _jumping = false;
 }
Exemple #33
0
 static public int get_radius(IntPtr l)
 {
     try {
         UnityEngine.CharacterController self = (UnityEngine.CharacterController)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.radius);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #34
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.CharacterController o;
         o = new UnityEngine.CharacterController();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #35
0
 static public int set_enableOverlapRecovery(IntPtr l)
 {
     try {
         UnityEngine.CharacterController self = (UnityEngine.CharacterController)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.enableOverlapRecovery = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #36
0
 static public int set_detectCollisions(IntPtr l)
 {
     try {
         UnityEngine.CharacterController self = (UnityEngine.CharacterController)checkSelf(l);
         bool v;
         checkType(l, 2, out v);
         self.detectCollisions = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #37
0
 static public int set_minMoveDistance(IntPtr l)
 {
     try {
         UnityEngine.CharacterController self = (UnityEngine.CharacterController)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.minMoveDistance = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #38
0
 static public int set_center(IntPtr l)
 {
     try {
         UnityEngine.CharacterController self = (UnityEngine.CharacterController)checkSelf(l);
         UnityEngine.Vector3             v;
         checkType(l, 2, out v);
         self.center = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Exemple #39
0
 static public int Move(IntPtr l)
 {
     try {
         UnityEngine.CharacterController self = (UnityEngine.CharacterController)checkSelf(l);
         UnityEngine.Vector3             a1;
         checkType(l, 2, out a1);
         var ret = self.Move(a1);
         pushValue(l, true);
         pushEnum(l, (int)ret);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
    static int set_center(IntPtr L)
    {
        UnityEngine.CharacterController obj  = (UnityEngine.CharacterController)ToLua.ToObject(L, 1);
        UnityEngine.Vector3             arg0 = ToLua.ToVector3(L, 2);

        try
        {
            obj.center = arg0;
        }
        catch (Exception e)
        {
            return(LuaDLL.luaL_error(L, obj == null ? "attempt to index center on a nil value" : e.Message));
        }

        return(0);
    }
 static int Move(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.CharacterController obj  = (UnityEngine.CharacterController)ToLua.CheckObject(L, 1, typeof(UnityEngine.CharacterController));
         UnityEngine.Vector3             arg0 = ToLua.ToVector3(L, 2);
         UnityEngine.CollisionFlags      o    = obj.Move(arg0);
         ToLua.Push(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int set_skinWidth(IntPtr L)
    {
        UnityEngine.CharacterController obj = (UnityEngine.CharacterController)ToLua.ToObject(L, 1);
        float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);

        try
        {
            obj.skinWidth = arg0;
        }
        catch (Exception e)
        {
            return(LuaDLL.luaL_error(L, obj == null ? "attempt to index skinWidth on a nil value" : e.Message));
        }

        return(0);
    }
 static int SimpleMove(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UnityEngine.CharacterController obj  = (UnityEngine.CharacterController)ToLua.CheckObject(L, 1, typeof(UnityEngine.CharacterController));
         UnityEngine.Vector3             arg0 = ToLua.ToVector3(L, 2);
         bool o = obj.SimpleMove(arg0);
         LuaDLL.lua_pushboolean(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int set_detectCollisions(IntPtr L)
    {
        UnityEngine.CharacterController obj = (UnityEngine.CharacterController)ToLua.ToObject(L, 1);
        bool arg0 = LuaDLL.luaL_checkboolean(L, 2);

        try
        {
            obj.detectCollisions = arg0;
        }
        catch (Exception e)
        {
            return(LuaDLL.luaL_error(L, obj == null ? "attempt to index detectCollisions on a nil value" : e.Message));
        }

        return(0);
    }
    static int get_skinWidth(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            float ret = obj.skinWidth;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index skinWidth on a nil value" : e.Message));
        }
    }
    static int get_center(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            UnityEngine.Vector3             ret = obj.center;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index center on a nil value" : e.Message));
        }
    }
    static int get_velocity(IntPtr L)
    {
        UnityEngine.CharacterController obj = (UnityEngine.CharacterController)ToLua.ToObject(L, 1);
        UnityEngine.Vector3             ret;

        try
        {
            ret = obj.velocity;
        }
        catch (Exception e)
        {
            return(LuaDLL.luaL_error(L, obj == null ? "attempt to index velocity on a nil value" : e.Message));
        }

        ToLua.Push(L, ret);
        return(1);
    }
    static int get_collisionFlags(IntPtr L)
    {
        UnityEngine.CharacterController obj = (UnityEngine.CharacterController)ToLua.ToObject(L, 1);
        UnityEngine.CollisionFlags      ret;

        try
        {
            ret = obj.collisionFlags;
        }
        catch (Exception e)
        {
            return(LuaDLL.luaL_error(L, obj == null ? "attempt to index collisionFlags on a nil value" : e.Message));
        }

        ToLua.Push(L, ret);
        return(1);
    }
    static int get_stepOffset(IntPtr L)
    {
        UnityEngine.CharacterController obj = (UnityEngine.CharacterController)ToLua.ToObject(L, 1);
        float ret;

        try
        {
            ret = obj.stepOffset;
        }
        catch (Exception e)
        {
            return(LuaDLL.luaL_error(L, obj == null ? "attempt to index stepOffset on a nil value" : e.Message));
        }

        LuaDLL.lua_pushnumber(L, ret);
        return(1);
    }
Exemple #50
0
    static int set_detectCollisions(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.detectCollisions = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index detectCollisions on a nil value"));
        }
    }
Exemple #51
0
    static int set_center(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj  = (UnityEngine.CharacterController)o;
            UnityEngine.Vector3             arg0 = ToLua.ToVector3(L, 2);
            obj.center = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index center on a nil value"));
        }
    }
Exemple #52
0
    static int set_enableOverlapRecovery(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            bool arg0 = LuaDLL.luaL_checkboolean(L, 2);
            obj.enableOverlapRecovery = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index enableOverlapRecovery on a nil value" : e.Message));
        }
    }
Exemple #53
0
    static int get_velocity(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            UnityEngine.Vector3             ret = obj.velocity;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index velocity on a nil value"));
        }
    }
Exemple #54
0
    static int get_collisionFlags(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            UnityEngine.CollisionFlags      ret = obj.collisionFlags;
            LuaDLL.lua_pushinteger(L, (int)ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index collisionFlags on a nil value"));
        }
    }
    static int get_detectCollisions(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            bool ret = obj.detectCollisions;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index detectCollisions on a nil value" : e.Message));
        }
    }
Exemple #56
0
    static int get_enableOverlapRecovery(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            bool ret = obj.enableOverlapRecovery;
            LuaDLL.lua_pushboolean(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index enableOverlapRecovery on a nil value"));
        }
    }
    static int set_stepOffset(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.stepOffset = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index stepOffset on a nil value" : e.Message));
        }
    }
    static int _CreateUnityEngine_CharacterController(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            UnityEngine.CharacterController obj = new UnityEngine.CharacterController();
            ToLua.Push(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: UnityEngine.CharacterController.New");
        }

        return(0);
    }
Exemple #59
0
    static int get_minMoveDistance(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            float ret = obj.minMoveDistance;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index minMoveDistance on a nil value"));
        }
    }
Exemple #60
0
    static int set_minMoveDistance(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UnityEngine.CharacterController obj = (UnityEngine.CharacterController)o;
            float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.minMoveDistance = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index minMoveDistance on a nil value"));
        }
    }