23 changed files with 552 additions and 1 deletions
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 1e865eccf6581354e98112bb4c3fd9db |
||||
folderAsset: yes |
||||
timeCreated: 1621996063 |
||||
licenseType: Free |
||||
DefaultImporter: |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,39 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
using UnityEditor; |
||||
using UnityEngine.AI; |
||||
using System.IO; |
||||
using System.Text; |
||||
using System; |
||||
|
||||
public class SceneTools |
||||
{ |
||||
|
||||
|
||||
[MenuItem("SceneTools/SetTankType")] |
||||
public static void SetTankType() |
||||
{ |
||||
GameObject select = (GameObject)Selection.activeObject; |
||||
if (select.GetComponent<TankType>()&&!select.GetComponent<RectTransform>()) |
||||
{ |
||||
OilTankType selecttype = select.GetComponent<TankType>().OilTankType; |
||||
Transform[] obj = Selection.GetTransforms(SelectionMode.Deep); |
||||
{ |
||||
for (int i = 0; i < obj.Length; i++) |
||||
{ |
||||
if (obj[i].GetComponent<DisassemblePos>()) |
||||
{ |
||||
obj[i].GetComponent<DisassemblePos>().tankType = selecttype; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
Debug.Log("这东西不行"); |
||||
} |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 0c83f34e6ceb39a42adadf07b974de04 |
||||
timeCreated: 1621996175 |
||||
licenseType: Free |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 5971f0b843aa45b498d45b6e7d0c4836 |
||||
folderAsset: yes |
||||
timeCreated: 1621913010 |
||||
licenseType: Free |
||||
DefaultImporter: |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
After Width: | Height: | Size: 178 KiB |
@ -0,0 +1,68 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 3593bea5222b9f840a3a485f40ad819f |
||||
timeCreated: 1621913010 |
||||
licenseType: Free |
||||
TextureImporter: |
||||
fileIDToRecycleName: {} |
||||
serializedVersion: 4 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 1 |
||||
sRGBTexture: 1 |
||||
linearTexture: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: 0.25 |
||||
normalMapFilter: 0 |
||||
isReadable: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 6 |
||||
cubemapConvolution: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: 1 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
filterMode: -1 |
||||
aniso: -1 |
||||
mipBias: -1 |
||||
wrapMode: -1 |
||||
nPOTScale: 1 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 0 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: 0.5, y: 0.5} |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spritePixelsToUnits: 100 |
||||
alphaUsage: 1 |
||||
alphaIsTransparency: 0 |
||||
spriteTessellationDetail: -1 |
||||
textureType: 0 |
||||
textureShape: 1 |
||||
maxTextureSizeSet: 0 |
||||
compressionQualitySet: 0 |
||||
textureFormatSet: 0 |
||||
platformSettings: |
||||
- buildTarget: DefaultTexturePlatform |
||||
maxTextureSize: 2048 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
spriteSheet: |
||||
serializedVersion: 2 |
||||
sprites: [] |
||||
outline: [] |
||||
spritePackingTag: |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
After Width: | Height: | Size: 116 KiB |
@ -0,0 +1,68 @@
|
||||
fileFormatVersion: 2 |
||||
guid: ddebbf82c6a85234a9fe86651c28e32c |
||||
timeCreated: 1621913011 |
||||
licenseType: Free |
||||
TextureImporter: |
||||
fileIDToRecycleName: {} |
||||
serializedVersion: 4 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 1 |
||||
sRGBTexture: 1 |
||||
linearTexture: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: 0.25 |
||||
normalMapFilter: 0 |
||||
isReadable: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 6 |
||||
cubemapConvolution: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: 1 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
filterMode: -1 |
||||
aniso: -1 |
||||
mipBias: -1 |
||||
wrapMode: -1 |
||||
nPOTScale: 1 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 0 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: 0.5, y: 0.5} |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spritePixelsToUnits: 100 |
||||
alphaUsage: 1 |
||||
alphaIsTransparency: 0 |
||||
spriteTessellationDetail: -1 |
||||
textureType: 0 |
||||
textureShape: 1 |
||||
maxTextureSizeSet: 0 |
||||
compressionQualitySet: 0 |
||||
textureFormatSet: 0 |
||||
platformSettings: |
||||
- buildTarget: DefaultTexturePlatform |
||||
maxTextureSize: 2048 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
spriteSheet: |
||||
serializedVersion: 2 |
||||
sprites: [] |
||||
outline: [] |
||||
spritePackingTag: |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
After Width: | Height: | Size: 3.7 MiB |
@ -0,0 +1,68 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 5801f1c67250ccf4cad4026de7e22957 |
||||
timeCreated: 1621913011 |
||||
licenseType: Free |
||||
TextureImporter: |
||||
fileIDToRecycleName: {} |
||||
serializedVersion: 4 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 1 |
||||
sRGBTexture: 1 |
||||
linearTexture: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: 0.25 |
||||
normalMapFilter: 0 |
||||
isReadable: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 6 |
||||
cubemapConvolution: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: 1 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
filterMode: -1 |
||||
aniso: -1 |
||||
mipBias: -1 |
||||
wrapMode: -1 |
||||
nPOTScale: 1 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 0 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: 0.5, y: 0.5} |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spritePixelsToUnits: 100 |
||||
alphaUsage: 1 |
||||
alphaIsTransparency: 0 |
||||
spriteTessellationDetail: -1 |
||||
textureType: 0 |
||||
textureShape: 1 |
||||
maxTextureSizeSet: 0 |
||||
compressionQualitySet: 0 |
||||
textureFormatSet: 0 |
||||
platformSettings: |
||||
- buildTarget: DefaultTexturePlatform |
||||
maxTextureSize: 2048 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
spriteSheet: |
||||
serializedVersion: 2 |
||||
sprites: [] |
||||
outline: [] |
||||
spritePackingTag: |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
After Width: | Height: | Size: 1016 KiB |
@ -0,0 +1,68 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 59dad07b9f4b87242ba5b2c7e5794091 |
||||
timeCreated: 1621913011 |
||||
licenseType: Free |
||||
TextureImporter: |
||||
fileIDToRecycleName: {} |
||||
serializedVersion: 4 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 1 |
||||
sRGBTexture: 1 |
||||
linearTexture: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: 0.25 |
||||
normalMapFilter: 0 |
||||
isReadable: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 6 |
||||
cubemapConvolution: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: 1 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
filterMode: -1 |
||||
aniso: -1 |
||||
mipBias: -1 |
||||
wrapMode: -1 |
||||
nPOTScale: 1 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 0 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: 0.5, y: 0.5} |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spritePixelsToUnits: 100 |
||||
alphaUsage: 1 |
||||
alphaIsTransparency: 0 |
||||
spriteTessellationDetail: -1 |
||||
textureType: 0 |
||||
textureShape: 1 |
||||
maxTextureSizeSet: 0 |
||||
compressionQualitySet: 0 |
||||
textureFormatSet: 0 |
||||
platformSettings: |
||||
- buildTarget: DefaultTexturePlatform |
||||
maxTextureSize: 2048 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
spriteSheet: |
||||
serializedVersion: 2 |
||||
sprites: [] |
||||
outline: [] |
||||
spritePackingTag: |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
After Width: | Height: | Size: 187 KiB |
@ -0,0 +1,68 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 38e2f3fbc09ab844992606289d718fb8 |
||||
timeCreated: 1621913010 |
||||
licenseType: Free |
||||
TextureImporter: |
||||
fileIDToRecycleName: {} |
||||
serializedVersion: 4 |
||||
mipmaps: |
||||
mipMapMode: 0 |
||||
enableMipMap: 1 |
||||
sRGBTexture: 1 |
||||
linearTexture: 0 |
||||
fadeOut: 0 |
||||
borderMipMap: 0 |
||||
mipMapFadeDistanceStart: 1 |
||||
mipMapFadeDistanceEnd: 3 |
||||
bumpmap: |
||||
convertToNormalMap: 0 |
||||
externalNormalMap: 0 |
||||
heightScale: 0.25 |
||||
normalMapFilter: 0 |
||||
isReadable: 0 |
||||
grayScaleToAlpha: 0 |
||||
generateCubemap: 6 |
||||
cubemapConvolution: 0 |
||||
seamlessCubemap: 0 |
||||
textureFormat: 1 |
||||
maxTextureSize: 2048 |
||||
textureSettings: |
||||
filterMode: -1 |
||||
aniso: -1 |
||||
mipBias: -1 |
||||
wrapMode: -1 |
||||
nPOTScale: 1 |
||||
lightmap: 0 |
||||
compressionQuality: 50 |
||||
spriteMode: 0 |
||||
spriteExtrude: 1 |
||||
spriteMeshType: 1 |
||||
alignment: 0 |
||||
spritePivot: {x: 0.5, y: 0.5} |
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
||||
spritePixelsToUnits: 100 |
||||
alphaUsage: 1 |
||||
alphaIsTransparency: 0 |
||||
spriteTessellationDetail: -1 |
||||
textureType: 0 |
||||
textureShape: 1 |
||||
maxTextureSizeSet: 0 |
||||
compressionQualitySet: 0 |
||||
textureFormatSet: 0 |
||||
platformSettings: |
||||
- buildTarget: DefaultTexturePlatform |
||||
maxTextureSize: 2048 |
||||
textureFormat: -1 |
||||
textureCompression: 1 |
||||
compressionQuality: 50 |
||||
crunchedCompression: 0 |
||||
allowsAlphaSplitting: 0 |
||||
overridden: 0 |
||||
spriteSheet: |
||||
serializedVersion: 2 |
||||
sprites: [] |
||||
outline: [] |
||||
spritePackingTag: |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
Binary file not shown.
@ -0,0 +1,87 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public enum OilTankType |
||||
{ |
||||
None, |
||||
/// <summary> |
||||
/// 内浮顶罐 |
||||
/// </summary> |
||||
NFDG, |
||||
/// <summary> |
||||
/// 外服顶罐 |
||||
/// </summary> |
||||
WFDG, |
||||
/// <summary> |
||||
/// 球罐 |
||||
/// </summary> |
||||
QG, |
||||
/// <summary> |
||||
/// 拱顶罐 |
||||
/// </summary> |
||||
GDG, |
||||
} |
||||
public class SightPlantController : MonoBehaviour { |
||||
|
||||
public static SightPlantController Instace; |
||||
public OilTankType TankType; |
||||
public Transform NFDGpos; |
||||
public Transform WFDGpos; |
||||
public Transform QGpos; |
||||
public Transform GDGpos; |
||||
public Transform NFDGCanvasPos; |
||||
public Transform WFDGCanvasPos; |
||||
public Transform QGCanvasPos; |
||||
public Transform GDGCanvasPos; |
||||
public Transform plant; |
||||
public Transform plantCanvas; |
||||
|
||||
void Awake() |
||||
{ |
||||
if (Instace == null) |
||||
{ |
||||
Instace = this; |
||||
} |
||||
TankType = OilTankType.None; |
||||
} |
||||
public void SetType(OilTankType Type) |
||||
{ |
||||
TankType = Type; |
||||
} |
||||
public void SetPlantAndCanvasPos() |
||||
{ |
||||
switch (TankType) |
||||
{ |
||||
case OilTankType.None: |
||||
break; |
||||
case OilTankType.NFDG: |
||||
plant.position = NFDGpos.position; |
||||
plantCanvas.position=NFDGCanvasPos.position; |
||||
break; |
||||
case OilTankType.WFDG: |
||||
plant.position = WFDGpos.position; |
||||
plantCanvas.position = WFDGCanvasPos.position; |
||||
break; |
||||
case OilTankType.QG: |
||||
plant.position = QGpos.position; |
||||
plantCanvas.position = QGCanvasPos.position; |
||||
break; |
||||
case OilTankType.GDG: |
||||
plant.position = GDGpos.position; |
||||
plantCanvas.position = GDGCanvasPos.position; |
||||
break; |
||||
default: |
||||
break; |
||||
} |
||||
} |
||||
// Use this for initialization |
||||
void Start () { |
||||
|
||||
} |
||||
|
||||
// Update is called once per frame |
||||
void Update () { |
||||
|
||||
} |
||||
} |
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 1ee3e1b0d235f4240b21862b79c961ea |
||||
timeCreated: 1621925069 |
||||
licenseType: Free |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,9 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public class TankType : MonoBehaviour { |
||||
|
||||
public OilTankType OilTankType; |
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 6c1e5b1223bd0df42b80da342a6d6e72 |
||||
timeCreated: 1621991508 |
||||
licenseType: Free |
||||
MonoImporter: |
||||
serializedVersion: 2 |
||||
defaultReferences: [] |
||||
executionOrder: 0 |
||||
icon: {instanceID: 0} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
Binary file not shown.
Loading…
Reference in new issue