Spine.IkConstraint.Apply C# (CSharp) Method

Apply() public method

public Apply ( ) : void
return void
		public void Apply () {
			Bone target = this.target;
			ExposedList<Bone> bones = this.bones;
			switch (bones.Count) {
			case 1:
				Apply(bones.Items[0], target.worldX, target.worldY, mix);
				break;
			case 2:
				Apply(bones.Items[0], bones.Items[1], target.worldX, target.worldY, bendDirection, mix);
				break;
			}
		}

Same methods

IkConstraint::Apply ( Bone parent, Bone child, float targetX, float targetY, int bendDir, float alpha ) : void
IkConstraint::Apply ( Bone bone, float targetX, float targetY, float alpha ) : void

Usage Example

Esempio n. 1
0
        public void Apply()
        {
            Bone bone = this.target;
            ExposedList <Bone> exposedList = this.bones;
            int count = exposedList.Count;

            if (count != 1)
            {
                if (count == 2)
                {
                    IkConstraint.Apply(exposedList.Items[0], exposedList.Items[1], bone.worldX, bone.worldY, this.bendDirection, this.mix);
                }
            }
            else
            {
                IkConstraint.Apply(exposedList.Items[0], bone.worldX, bone.worldY, this.mix);
            }
        }