コード例 #1
0
 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.MatchTargetWeightMask o;
         UnityEngine.Vector3 a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         o = new UnityEngine.MatchTargetWeightMask(a1, a2);
         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
 }
コード例 #2
0
 static public int constructor(IntPtr l)
 {
     try {
         int argc = LuaDLL.lua_gettop(l);
         UnityEngine.MatchTargetWeightMask o;
         if (argc == 3)
         {
             UnityEngine.Vector3 a1;
             checkType(l, 2, out a1);
             System.Single a2;
             checkType(l, 3, out a2);
             o = new UnityEngine.MatchTargetWeightMask(a1, a2);
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         else if (argc <= 2)
         {
             o = new UnityEngine.MatchTargetWeightMask();
             pushValue(l, true);
             pushValue(l, o);
             return(2);
         }
         return(error(l, "New object failed."));
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #3
0
 static public int set_positionXYZWeight(IntPtr l)
 {
     UnityEngine.MatchTargetWeightMask o = (UnityEngine.MatchTargetWeightMask)checkSelf(l);
     UnityEngine.Vector3 v;
     checkType(l, 2, out v);
     o.positionXYZWeight = v;
     setBack(l, o);
     return(0);
 }
コード例 #4
0
    static public int set_rotationWeight(IntPtr l)
    {
        UnityEngine.MatchTargetWeightMask o = (UnityEngine.MatchTargetWeightMask)checkSelf(l);
        float v;

        checkType(l, 2, out v);
        o.rotationWeight = v;
        setBack(l, o);
        return(0);
    }
コード例 #5
0
 static public int constructor(IntPtr l)
 {
     UnityEngine.MatchTargetWeightMask o;
     UnityEngine.Vector3 a1;
     checkType(l, 2, out a1);
     System.Single a2;
     checkType(l, 3, out a2);
     o = new UnityEngine.MatchTargetWeightMask(a1, a2);
     pushObject(l, o);
     return(1);
 }
コード例 #6
0
        public override void Trigger(GameObject actor)
        {
            Animator animator = actor.GetComponent<Animator>();
            if (animator == null)
            {
                return;
            }

            MatchTargetWeightMask weightMask = new MatchTargetWeightMask(Vector3.one, 0);
            animator.MatchTarget(target.transform.position, target.transform.rotation, avatarTarget, weightMask, startTime, targetTime);
            
        }
コード例 #7
0
 static public int ctor_s(IntPtr l)
 {
     try {
         UnityEngine.MatchTargetWeightMask o;
         o = new UnityEngine.MatchTargetWeightMask();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
コード例 #8
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.MatchTargetWeightMask o;
         UnityEngine.Vector3 a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         o = new UnityEngine.MatchTargetWeightMask(a1, a2);
         pushValue(l, o);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static void MatchTargetWeightMask_rotationWeight(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.MatchTargetWeightMask _this = (UnityEngine.MatchTargetWeightMask)vc.csObj;
         var result = _this.rotationWeight;
         JSApi.setSingle((int)JSApi.SetType.Rval, (System.Single)(result));
     }
     else
     {
         System.Single arg0 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg);
         UnityEngine.MatchTargetWeightMask _this = (UnityEngine.MatchTargetWeightMask)vc.csObj;
         _this.rotationWeight = arg0;
         JSMgr.changeJSObj(vc.jsObjID, _this);
     }
 }
// fields

// properties
    static void MatchTargetWeightMask_positionXYZWeight(JSVCall vc)
    {
        if (vc.bGet)
        {
            UnityEngine.MatchTargetWeightMask _this = (UnityEngine.MatchTargetWeightMask)vc.csObj;
            var result = _this.positionXYZWeight;
            JSApi.setVector3S((int)JSApi.SetType.Rval, result);
        }
        else
        {
            UnityEngine.Vector3 arg0 = (UnityEngine.Vector3)JSApi.getVector3S((int)JSApi.GetType.Arg);
            UnityEngine.MatchTargetWeightMask _this = (UnityEngine.MatchTargetWeightMask)vc.csObj;
            _this.positionXYZWeight = arg0;
            JSMgr.changeJSObj(vc.jsObjID, _this);
        }
    }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.MatchTargetWeightMask o;
			UnityEngine.Vector3 a1;
			checkType(l,2,out a1);
			System.Single a2;
			checkType(l,3,out a2);
			o=new UnityEngine.MatchTargetWeightMask(a1,a2);
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
コード例 #12
0
 static public int constructor(IntPtr l)
 {
     LuaDLL.lua_remove(l, 1);
     UnityEngine.MatchTargetWeightMask o;
     if (matchType(l, 1, typeof(UnityEngine.Vector3), typeof(float)))
     {
         UnityEngine.Vector3 a1;
         checkType(l, 1, out a1);
         System.Single a2;
         checkType(l, 2, out a2);
         o = new UnityEngine.MatchTargetWeightMask(a1, a2);
         pushObject(l, o);
         return(1);
     }
     LuaDLL.luaL_error(l, "New object failed.");
     return(0);
 }
コード例 #13
0
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.MatchTargetWeightMask o;
         UnityEngine.Vector3 a1;
         checkType(l,2,out a1);
         System.Single a2;
         checkType(l,3,out a2);
         o=new UnityEngine.MatchTargetWeightMask(a1,a2);
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
コード例 #14
0
    //**********************************************************************************//
    // MATCH TARGET																		//
    // call this method to help animations find the correct target						//
    // don't forget to add the curve MatchStart and MatchEnd on the animation clip		//
    //**********************************************************************************//
    void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget target, 
        MatchTargetWeightMask weightMask, float normalisedStartTime, float normalisedEndTime)
    {
        if (animator.isMatchingTarget)
            return;

        float normalizeTime = Mathf.Repeat(animator.GetCurrentAnimatorStateInfo(0).normalizedTime, 1f);
        if (normalizeTime > normalisedEndTime)
            return;

        if(!ragdolled)
        animator.MatchTarget(matchPosition, matchRotation, target, weightMask, normalisedStartTime, normalisedEndTime);
    }
コード例 #15
0
 public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime)
 {
     this.MatchTarget(matchPosition, matchRotation, (int)targetBodyPart, weightMask, startNormalizedTime, 1f);
 }
コード例 #16
0
		void DoMatchTarget()
		{		
			if (_animator==null)
			{
				return;
			}
			
			Vector3 _pos = Vector3.zero;
			Quaternion _rot = Quaternion.identity;
			
			if (_transform!=null)
			{
				_pos = _transform.position;
				_rot = _transform.rotation;
			}
			
			if (!targetPosition.IsNone)
			{
				_pos += targetPosition.Value;
			}
			
			if (!targetRotation.IsNone)
			{
				_rot *= targetRotation.Value;

			}
		
			MatchTargetWeightMask _weightMask = new MatchTargetWeightMask(positionWeight.Value, rotationWeight.Value);
			_animator.MatchTarget(_pos,_rot, bodyPart, _weightMask, startNormalizedTime.Value, targetNormalizedTime.Value);
			
		}
コード例 #17
0
 public jump_match(Vector3 Position, Quaternion Rotation, float From, float To)
 {
     this.Position = Position; this.Rotation = Rotation; this.weight = new MatchTargetWeightMask(Vector3.one, 1f); this.From = From; this.To = To;
 }
コード例 #18
0
        public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime)
        {
            float targetNormalizedTime = 1f;

            Animator.INTERNAL_CALL_MatchTarget(this, ref matchPosition, ref matchRotation, targetBodyPart, ref weightMask, startNormalizedTime, targetNormalizedTime);
        }
コード例 #19
0
 private static extern void INTERNAL_CALL_MatchTarget(Animator self, ref Vector3 matchPosition, ref Quaternion matchRotation, AvatarTarget targetBodyPart, ref MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime);
コード例 #20
0
 public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime, [UnityEngine.Internal.DefaultValue("1")] float targetNormalizedTime)
 {
     Animator.INTERNAL_CALL_MatchTarget(this, ref matchPosition, ref matchRotation, targetBodyPart, ref weightMask, startNormalizedTime, targetNormalizedTime);
 }
コード例 #21
0
 private void DoMatchTarget()
 {
     if (this._animator == null)
     {
         return;
     }
     Vector3 vector = Vector3.zero;
     Quaternion quaternion = Quaternion.identity;
     if (this._transform != null)
     {
         vector = this._transform.position;
         quaternion = this._transform.rotation;
     }
     if (!this.targetPosition.IsNone)
     {
         vector += this.targetPosition.Value;
     }
     if (!this.targetRotation.IsNone)
     {
         quaternion *= this.targetRotation.Value;
     }
     MatchTargetWeightMask weightMask = new MatchTargetWeightMask(this.positionWeight.Value, this.rotationWeight.Value);
     this._animator.MatchTarget(vector, quaternion, this.bodyPart, weightMask, this.startNormalizedTime.Value, this.targetNormalizedTime.Value);
 }
コード例 #22
0
ファイル: MatchTarget.cs プロジェクト: AlexGam/TowerIsland
		void DoMatchTarget()
		{		
			MatchTargetWeightMask weightMask = new MatchTargetWeightMask(positionWeight.Value, rotationWeight.Value);
			animator.MatchTarget(matchPosition.Value,Quaternion.Euler( matchRotation.Value), bodyPart, weightMask, startNormalizedTime.Value, targetNormalizedTime.Value);
		}
コード例 #23
0
 private static void INTERNAL_CALL_MatchTarget(Animator self, ref Vector3 matchPosition, ref Quaternion matchRotation, AvatarTarget targetBodyPart, ref MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime)
 {
     throw new NotImplementedException("なにこれ");
 }
コード例 #24
0
 private extern void MatchTarget_Injected(ref Vector3 matchPosition, ref Quaternion matchRotation, int targetBodyPart, ref MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime);
コード例 #25
0
 private void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, int targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime, float targetNormalizedTime)
 {
     this.MatchTarget_Injected(ref matchPosition, ref matchRotation, targetBodyPart, ref weightMask, startNormalizedTime, targetNormalizedTime);
 }
コード例 #26
0
    static int _CreateMatchTargetWeightMask(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 2)
        {
            Vector3 arg0 = LuaScriptMgr.GetVector3(L, 1);
            float arg1 = (float)LuaScriptMgr.GetNumber(L, 2);
            MatchTargetWeightMask obj = new MatchTargetWeightMask(arg0,arg1);
            LuaScriptMgr.PushValue(L, obj);
            return 1;
        }
        else if (count == 0)
        {
            MatchTargetWeightMask obj = new MatchTargetWeightMask();
            LuaScriptMgr.PushValue(L, obj);
            return 1;
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: MatchTargetWeightMask.New");
        }

        return 0;
    }
コード例 #27
0
 public void MatchTarget(Vector3 matchPosition, Quaternion matchRotation, AvatarTarget targetBodyPart, MatchTargetWeightMask weightMask, float startNormalizedTime, [UnityEngine.Internal.DefaultValue("1")] float targetNormalizedTime)
 {
     this.MatchTarget(matchPosition, matchRotation, (int)targetBodyPart, weightMask, startNormalizedTime, targetNormalizedTime);
 }
コード例 #28
0
 static public int get_rotationWeight(IntPtr l)
 {
     UnityEngine.MatchTargetWeightMask o = (UnityEngine.MatchTargetWeightMask)checkSelf(l);
     pushValue(l, o.rotationWeight);
     return(1);
 }