コード例 #1
0
        public static MoveTask RotateTransform(this Transform from, Vector3 to, float rotationSpeed = MoveTask.DefaultRotationSpeed, bool IsPlus = false)
        {
            var task = new MoveTask(to, from, rotateSpeed: rotationSpeed, isPlus: IsPlus);

            AnilUpdate.Register(task);
            return(task);
        }
コード例 #2
0
        public static MoveTask Translate(this Transform from, Vector3 pos, Vector3 rot, float speed = MoveTask.DefaultSpeed, MoveType moveType = MoveType.towards,
                                         float rotationSpeed = MoveTask.DefaultRotationSpeed, bool IsPlus = false, Action endAction = null)
        {
            var task = new MoveTask(from, pos, rot, speed, rotationSpeed, moveType, IsPlus, false, endAction);

            AnilUpdate.Register(task);
            return(task);
        }
コード例 #3
0
        public static MoveTask MoveLocal(this Transform from, Vector3 to, float speed = MoveTask.DefaultSpeed, Action endAction = null,
                                         bool IsPlus = false, MoveType moveType = MoveType.towards)
        {
            var task = new MoveTask(from, to, speed, moveType, IsPlus, true, endAction);

            AnilUpdate.Register(task);
            return(task);
        }
コード例 #4
0
        public static MoveTask RotateTransform(this Transform from, Vector3[] to, float rotationSpeed = MoveTask.DefaultRotationSpeed, bool IsPlus = false)
        {
            var task = new MoveTask(to[0], from, rotateSpeed: rotationSpeed, isPlus: IsPlus);

            for (int i = 1; i < to.Length; i++)
            {
                task.JoinRotation(to[i]);
            }

            AnilUpdate.Register(task);
            return(task);
        }
コード例 #5
0
        public static MoveTask MoveArray(this Transform from, Transform[] to, float speed = MoveTask.DefaultSpeed, Action endAction = null, float rotationSpeed = MoveTask.DefaultRotationSpeed,
                                         MoveType moveType = MoveType.towards, bool reverse = false, bool IsPlus = false, bool isloacal = false)
        {
            var transforms = to.ToList();

            if (reverse)
            {
                transforms.Reverse();
            }

            var task = new MoveTask(from, transforms[0], speed, rotationSpeed, moveType, IsPlus, isloacal, endAction);

            for (int i = 1; i < to.Length; i++)
            {
                task.Join(transforms[i]);
            }

            AnilUpdate.Register(task);
            return(task);
        }