示例#1
0
        public void UpdateGoCamera(TimeUpdateEvent evt, GoCameraNode goCameraNode, [JoinAll] CameraTargetNode cameraTargetNode)
        {
            Transform     transform     = cameraTargetNode.cameraTarget.TargetObject.transform;
            int           goCameraIndex = goCameraNode.goCamera.goCameraIndex;
            GoCameraPoint point         = goCameraNode.goCameraPointsUnity.goCameraPoints[goCameraIndex];
            Vector3       vector        = (Vector3)(transform.rotation * point.poistion);
            TransformData data          = new TransformData {
                Position = transform.position + vector,
                Rotation = Quaternion.Euler(transform.rotation.eulerAngles + point.rotation)
            };

            goCameraNode.cameraTransformData.Data = data;
            base.ScheduleEvent(ApplyCameraTransformEvent.ResetApplyCameraTransformEvent(), goCameraNode);
        }
示例#2
0
        public void InitGoCamera(NodeAddedEvent evt, GoCameraNode goCameraNode, [JoinAll] CameraTargetNode cameraTargetNode)
        {
            int num = Random.Range(0, goCameraNode.goCameraPointsUnity.goCameraPoints.Length);

            goCameraNode.goCamera.goCameraIndex = num;
        }