示例#1
0
        public Vector3 GetTransform(TransformAxisVectors transformAxis)
        {
            switch (transformAxis)
            {
            case TransformAxisVectors.UpPositive:
                return(MissileReferenceTransform.up);

            case TransformAxisVectors.UpNegative:
                return(-MissileReferenceTransform.up);

            case TransformAxisVectors.ForwardPositive:
                return(MissileReferenceTransform.forward);

            case TransformAxisVectors.ForwardNegative:
                return(-MissileReferenceTransform.forward);

            case TransformAxisVectors.RightNegative:
                return(-MissileReferenceTransform.right);

            case TransformAxisVectors.RightPositive:
                return(MissileReferenceTransform.right);

            default:
                return(MissileReferenceTransform.forward);
            }
        }
示例#2
0
 private void SetMissileTransform()
 {
     MissileReferenceTransform = part.transform;
     ForwardTransformAxis      = (TransformAxisVectors)Enum.Parse(typeof(TransformAxisVectors), ForwardTransform);
     UpTransformAxis           = (TransformAxisVectors)Enum.Parse(typeof(TransformAxisVectors), UpTransform);
 }