曹衍涛
1 month ago
35 changed files with 5291 additions and 4669 deletions
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2 |
||||
guid: acca00e1dbe19a849a405f9fb486c34f |
||||
folderAsset: yes |
||||
DefaultImporter: |
||||
externalObjects: {} |
||||
userData: |
||||
assetBundleName: |
||||
assetBundleVariant: |
@ -0,0 +1,29 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
/// <summary> |
||||
/// 游戏对象信息基类 |
||||
/// </summary> |
||||
public class BaseGameObjInfo : MonoBehaviour { |
||||
|
||||
public long gameObjID;//游戏对象ID |
||||
public CloneObjType gameObjType;//游戏对象类型 |
||||
|
||||
public long GameObjID { get { return gameObjID; } } |
||||
|
||||
public void SetGameObjID(long id) |
||||
{ |
||||
gameObjID = id; |
||||
} |
||||
|
||||
// Use this for initialization |
||||
void Start () { |
||||
|
||||
} |
||||
|
||||
// Update is called once per frame |
||||
void Update () { |
||||
|
||||
} |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: a4c084de76af8c349ae1f222d8716b1b |
@ -0,0 +1,11 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public class CameraViewDataForFunArea : MonoBehaviour |
||||
{ |
||||
public Vector3 TargetPos; |
||||
public float CameraX; |
||||
public float CameraY; |
||||
public float Distance; |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 78722e55a6f8aa54db9f860ce5caf529 |
@ -0,0 +1,24 @@
|
||||
|
||||
/// <summary> |
||||
/// 克隆游戏对象信息基类 |
||||
/// </summary> |
||||
public class CloneGameObjInfo : BaseGameObjInfo |
||||
{ |
||||
public string buildNum;//楼号 |
||||
public int floorNum;//层号 |
||||
public int interlayerNum;//夹层号,0表示不是夹层,1表示第一个夹层 |
||||
|
||||
public int Layer; |
||||
|
||||
public bool ShoworHidden;//显示或隐藏 |
||||
public string FullName; |
||||
public string SpecialTag = ""; |
||||
} |
||||
|
||||
public struct SpreadObjHandle |
||||
{ |
||||
public long gameObjId; |
||||
public CloneObjType gameObjType; |
||||
public bool isShow;//是否显示:true表示显示出来;false表示隐藏 |
||||
} |
||||
|
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 77fb9be10c0901f46a68b3ee09e7972b |
@ -0,0 +1,307 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
/// <summary> |
||||
/// 克隆类型(枚举) |
||||
/// </summary> |
||||
public enum CloneObjType |
||||
{ |
||||
None = 0, |
||||
|
||||
//基本信息能克隆的实体类型 |
||||
AdjoiningBuildings = 1,//毗邻 |
||||
NoParkingArea = 2,//禁停区 |
||||
KeyParts = 3,//重点部位 |
||||
FireControlRoom = 4,//消控室 |
||||
PumpRoom = 5,//泵房 |
||||
BubblePumpRoom = 6,//泡沫泵房 |
||||
WaterTank = 7,//水罐 |
||||
PostFireHydrant = 8,//地上消火栓 |
||||
FlushFireHydrant = 9,//地下消火栓 |
||||
PumpAdapter = 10,//水泵接合器 |
||||
FireWaterMonitor = 11,//消防水炮 |
||||
FoamHydrant = 12,//泡沫栓 |
||||
IndoorFireHydrant = 13,//室内消火栓 |
||||
|
||||
//消防力量设定图标克隆类型 |
||||
ZongDuiIcon = 101,//中队图标 |
||||
ZhiDuiIcon = 102,//大队图标 |
||||
DaDuiIcon = 103,//支队图标 |
||||
ZhongDuiIcon = 104,//总队图标 |
||||
|
||||
//灾情能克隆的实体类型 |
||||
//注意:在增加灾情类型的时候要在带入答案的地方处理 |
||||
NormalFire = 200,//普通火 |
||||
FullSurfaceFire = 201,//全液面火 |
||||
Insider = 202,//知情人 |
||||
TrappedPerson = 203,//被困人员 |
||||
WoundedPerson = 204,//伤员 |
||||
FlowingFire = 205,//地面流淌火 |
||||
Boilover = 206,//泄露 |
||||
Smoke = 207,//烟雾 |
||||
FireOpenType = 208,//敞开式燃烧 |
||||
FireBreakThough = 209,//突破火 |
||||
ForcibleEntryDoor = 210,//破拆门 |
||||
|
||||
//消防力量克隆类型:车辆类型 |
||||
WaterTanker = 250,//水罐车 |
||||
FoamFireTruck = 251,//泡沫车 |
||||
HighSprayingCar = 252,//高喷车 |
||||
LadderTruck = 253,//云梯车 |
||||
LiftTruck = 254,//举高车 |
||||
SmokeCar = 255,//排烟车 |
||||
RescueVehicle = 256,//抢险救援车 |
||||
LightingVehicle = 257,//照明车 |
||||
InflatableCar = 258,//供气车 |
||||
CommandVehicle = 259,//指挥车 |
||||
ForcibleCar = 260,//破拆车 |
||||
EquipmentCar = 261,//器材车 |
||||
RemoteWaterSupplyTruck = 262,//远程供水车 |
||||
DecontaminationTruck = 263,//洗消车 |
||||
LiquidSupplyTruck = 264,//供液车 |
||||
FoodSecurityTruck = 265,//饮食保障车 |
||||
EquipmentTransportTruck = 266,//装备运输车 |
||||
EquipmentRepairTruck = 267,//装备抢修车 |
||||
MedicalSupportTruck = 268,//卫勤保障车 |
||||
PowderFireTruck = 269,//干粉车 |
||||
|
||||
//消防力量克隆类型:消防员,移动水炮,灭火机器人等特殊装备类型 |
||||
Fireman = 300,//消防员 |
||||
MobileWaterCannon = 301,//移动水炮 |
||||
FireFightingRobot = 302,//灭火机器人 |
||||
SnowstormCannon = 303,//暴风雪炮 |
||||
|
||||
//工具克隆类型 |
||||
WarningLine = 350,//警戒线 |
||||
FireHose = 351,//消防水带 |
||||
Attack = 352,//进攻 |
||||
Retreat = 353,//撤退 |
||||
CommandPost = 354,//火场指挥部 |
||||
StagingArea = 355,//集结区 |
||||
WaterCurtainHose = 356,//水幕水带 |
||||
RegionalSettings = 357,//区域设定 |
||||
SafeArea = 358,//安全区 |
||||
ZhongDuiCommander = 359,//中队指挥员 |
||||
ZhiDuiCommander = 360,//支队指挥员 |
||||
SupportArea = 361,//战勤保障集结区 |
||||
WaterBisector = 362,//二分水器 |
||||
WaterTrisector = 363,//三分水器 |
||||
SafetyOfficer = 364,//安全员 |
||||
//WaterCurtain=365,//水幕水带 |
||||
FoamHookPipe = 365,//泡沫钩管 |
||||
TheSurroundingWaterPoint = 366,//周边水源取水点 |
||||
FirePoolPoint = 367,//消防水池取水点 |
||||
DecontaminationArea = 368,//洗消区 |
||||
SmokeExhaustFan = 369,//排烟风机 |
||||
|
||||
//技能要克隆的物体的克隆类型 |
||||
BlockOff = 400,//封堵 |
||||
DrawLine = 401,//铺设的管线 |
||||
LifeLightLine = 402,//铺设的就剩照明线 |
||||
|
||||
//截图工具克隆类型 |
||||
Rectangle = 450,//矩形 |
||||
Circular = 451,//圆形 |
||||
Arrow = 452,//箭头 |
||||
Text = 453,//文字 |
||||
|
||||
//战术板工具克隆类型 |
||||
TBArrow = 500,//战术板箭头 |
||||
CutOff = 501,//堵截 |
||||
BreakThrough = 502,//突破 |
||||
Segment = 503,//分割 |
||||
Suppress = 504,//围剿 |
||||
PincerAttack = 505,//夹攻 |
||||
JointAttack = 506,//合击 |
||||
//通信保障克隆类型 |
||||
UVA = 550,//无人机 |
||||
MonitorBall = 551,//布控球 |
||||
MeshSolider = 552,//mesh单兵 |
||||
FourGSolider = 553,//4g单兵图传 |
||||
DigitalInterphone = 554,//数字对讲机 |
||||
FourGBS = 555,//4g基站 |
||||
VoiceReplayStation = 556,//语音中继台 |
||||
PortableSateLliteStation = 557,//卫星便携站 |
||||
PaintingLanguagePlatform = 558,//语绘平台 |
||||
MeshRelaying = 559, //mesh中继 |
||||
SignalBox = 560,//信号塔 |
||||
//联动力量克隆类型 |
||||
Cruiser = 600,//巡逻车 |
||||
Motorbike = 601,//摩托车 |
||||
Ambulance = 602,//救护车 |
||||
PatrolWagon = 603,//警车 |
||||
ElectricRepairCar = 604,//电力抢修车 |
||||
GasRepairCar = 605,//燃气抢修车 |
||||
WaterSupplyRepairCar = 606,//供水抢修车 |
||||
EnvironmentalTestingVehicle = 607,//环保检测车 |
||||
TransportVehicle = 608,//交通运输车 |
||||
SanitartPreventionVehicle = 609,//卫生防疫车 |
||||
EmergencyCommunicationVehicle = 610,//应急通讯车 |
||||
FamilyCar = 611,//家庭轿车 |
||||
EnterpriseMechanic = 612,//企业技工 |
||||
PublicSecurity = 613,//保安 |
||||
OfficeClerk = 614,//职员 |
||||
Manager = 615,//经理 |
||||
TechnicalEngineer = 616,//技术工程师 |
||||
Doctor = 617,//医生 |
||||
|
||||
Team = 1000,//消防员组 |
||||
StaticGameObject = 1001,//场景中固有的静态游戏实体对象 |
||||
StaticUI = 1002//静态UI |
||||
} |
||||
|
||||
/// <summary> |
||||
/// 根据克隆类型获取其对应的中文名称。 |
||||
/// Tips:添加克隆类型时,注意同步添加到CloneTypeDic字典中 |
||||
/// </summary> |
||||
public class CloneObjTypeName |
||||
{ |
||||
private CloneObjTypeName() { } |
||||
private static CloneObjTypeName instance; |
||||
private static Dictionary<CloneObjType, string> CloneTypeDic; |
||||
public static CloneObjTypeName Instance |
||||
{ |
||||
get |
||||
{ |
||||
if (null == instance) |
||||
{ |
||||
instance = new CloneObjTypeName(); |
||||
InitCloneTypeDic(); |
||||
} |
||||
return instance; |
||||
} |
||||
} |
||||
|
||||
public string GetCloneObjTypeName(CloneObjType type) |
||||
{ |
||||
string name = "未命名"; |
||||
CloneTypeDic.TryGetValue(type, out name); |
||||
return name; |
||||
} |
||||
|
||||
private static void InitCloneTypeDic() |
||||
{ |
||||
CloneTypeDic = new Dictionary<CloneObjType, string>(); |
||||
|
||||
CloneTypeDic.Add(CloneObjType.AdjoiningBuildings, "毗邻"); |
||||
CloneTypeDic.Add(CloneObjType.NoParkingArea, "禁停区"); |
||||
CloneTypeDic.Add(CloneObjType.KeyParts, "重点部位"); |
||||
CloneTypeDic.Add(CloneObjType.FireControlRoom, "消控室"); |
||||
CloneTypeDic.Add(CloneObjType.PumpRoom, "泵房"); |
||||
CloneTypeDic.Add(CloneObjType.BubblePumpRoom, "泡沫泵房"); |
||||
CloneTypeDic.Add(CloneObjType.WaterTank, "水罐"); |
||||
CloneTypeDic.Add(CloneObjType.PostFireHydrant, "地上消火栓"); |
||||
CloneTypeDic.Add(CloneObjType.FlushFireHydrant, "地下消火栓"); |
||||
CloneTypeDic.Add(CloneObjType.PumpAdapter, "水泵接合器"); |
||||
CloneTypeDic.Add(CloneObjType.FireWaterMonitor, "消防水炮"); |
||||
CloneTypeDic.Add(CloneObjType.FoamHydrant, "泡沫栓"); |
||||
|
||||
CloneTypeDic.Add(CloneObjType.NormalFire, "普通火"); |
||||
CloneTypeDic.Add(CloneObjType.FullSurfaceFire, "全液面火"); |
||||
CloneTypeDic.Add(CloneObjType.Insider, "知情人"); |
||||
CloneTypeDic.Add(CloneObjType.TrappedPerson, "被困人员"); |
||||
CloneTypeDic.Add(CloneObjType.WoundedPerson, "伤员"); |
||||
CloneTypeDic.Add(CloneObjType.Boilover, "泄露"); |
||||
CloneTypeDic.Add(CloneObjType.Smoke, "烟雾"); |
||||
CloneTypeDic.Add(CloneObjType.FlowingFire, "流淌火"); |
||||
CloneTypeDic.Add(CloneObjType.FireOpenType, "敞开式燃烧"); |
||||
CloneTypeDic.Add(CloneObjType.FireBreakThough, "突破火"); |
||||
CloneTypeDic.Add(CloneObjType.ForcibleEntryDoor, "破拆点"); |
||||
|
||||
CloneTypeDic.Add(CloneObjType.WaterTanker, "水罐车"); |
||||
CloneTypeDic.Add(CloneObjType.FoamFireTruck, "泡沫车"); |
||||
CloneTypeDic.Add(CloneObjType.HighSprayingCar, "高喷车"); |
||||
CloneTypeDic.Add(CloneObjType.LadderTruck, "云梯车"); |
||||
CloneTypeDic.Add(CloneObjType.LiftTruck, "举高车"); |
||||
CloneTypeDic.Add(CloneObjType.SmokeCar, "排烟车"); |
||||
CloneTypeDic.Add(CloneObjType.RescueVehicle, "抢险救援车"); |
||||
CloneTypeDic.Add(CloneObjType.LightingVehicle, "照明车"); |
||||
CloneTypeDic.Add(CloneObjType.InflatableCar, "供气车"); |
||||
CloneTypeDic.Add(CloneObjType.CommandVehicle, "指挥车"); |
||||
CloneTypeDic.Add(CloneObjType.ForcibleCar, "破拆车"); |
||||
CloneTypeDic.Add(CloneObjType.EquipmentCar, "器材车"); |
||||
CloneTypeDic.Add(CloneObjType.RemoteWaterSupplyTruck, "远程供水车"); |
||||
CloneTypeDic.Add(CloneObjType.DecontaminationTruck, "洗消车"); |
||||
CloneTypeDic.Add(CloneObjType.LiquidSupplyTruck, "供液车"); |
||||
CloneTypeDic.Add(CloneObjType.FoodSecurityTruck, "饮食保障车"); |
||||
CloneTypeDic.Add(CloneObjType.EquipmentTransportTruck, "装备运输车"); |
||||
CloneTypeDic.Add(CloneObjType.EquipmentRepairTruck, "装备抢修车"); |
||||
CloneTypeDic.Add(CloneObjType.MedicalSupportTruck, "卫勤保障车"); |
||||
CloneTypeDic.Add(CloneObjType.PowderFireTruck, "干粉车"); |
||||
CloneTypeDic.Add(CloneObjType.Fireman, "消防员"); |
||||
CloneTypeDic.Add(CloneObjType.MobileWaterCannon, "移动水炮"); |
||||
CloneTypeDic.Add(CloneObjType.FireFightingRobot, "灭火机器人"); |
||||
CloneTypeDic.Add(CloneObjType.SnowstormCannon, "暴风雪炮"); |
||||
|
||||
CloneTypeDic.Add(CloneObjType.WarningLine, "警戒线"); |
||||
CloneTypeDic.Add(CloneObjType.FireHose, "水带"); |
||||
CloneTypeDic.Add(CloneObjType.Attack, "进攻"); |
||||
CloneTypeDic.Add(CloneObjType.Retreat, "撤退"); |
||||
CloneTypeDic.Add(CloneObjType.CommandPost, "指挥部"); |
||||
CloneTypeDic.Add(CloneObjType.StagingArea, "集结区"); |
||||
CloneTypeDic.Add(CloneObjType.SafeArea, "安全区"); |
||||
CloneTypeDic.Add(CloneObjType.SupportArea, "战勤保障集结区"); |
||||
CloneTypeDic.Add(CloneObjType.ZhongDuiCommander, "中队指挥员"); |
||||
CloneTypeDic.Add(CloneObjType.ZhiDuiCommander, "支队指挥员"); |
||||
CloneTypeDic.Add(CloneObjType.WaterCurtainHose, "水幕水带"); |
||||
CloneTypeDic.Add(CloneObjType.RegionalSettings, "区域设定"); |
||||
CloneTypeDic.Add(CloneObjType.WaterBisector, "二分水器"); |
||||
CloneTypeDic.Add(CloneObjType.WaterTrisector, "三分水器"); |
||||
//CloneTypeDic.Add(CloneObjType.WaterCurtainHose, "水幕水带"); |
||||
CloneTypeDic.Add(CloneObjType.SafetyOfficer, "安全员"); |
||||
CloneTypeDic.Add(CloneObjType.FoamHookPipe, "泡沫钩管"); |
||||
CloneTypeDic.Add(CloneObjType.TheSurroundingWaterPoint, "周边水源取水点"); |
||||
CloneTypeDic.Add(CloneObjType.FirePoolPoint, "消防水池取水点"); |
||||
CloneTypeDic.Add(CloneObjType.DecontaminationArea, "洗消区"); |
||||
CloneTypeDic.Add(CloneObjType.SmokeExhaustFan, "排烟机"); |
||||
|
||||
|
||||
CloneTypeDic.Add(CloneObjType.BlockOff, "封堵"); |
||||
|
||||
CloneTypeDic.Add(CloneObjType.Rectangle, "矩形"); |
||||
CloneTypeDic.Add(CloneObjType.Circular, "圆形"); |
||||
CloneTypeDic.Add(CloneObjType.Arrow, "箭头"); |
||||
CloneTypeDic.Add(CloneObjType.Text, "文字"); |
||||
|
||||
CloneTypeDic.Add(CloneObjType.TBArrow, "战术箭头"); |
||||
CloneTypeDic.Add(CloneObjType.CutOff, "堵截"); |
||||
CloneTypeDic.Add(CloneObjType.BreakThrough, "突破"); |
||||
CloneTypeDic.Add(CloneObjType.Segment, "分割"); |
||||
CloneTypeDic.Add(CloneObjType.Suppress, "围剿"); |
||||
CloneTypeDic.Add(CloneObjType.PincerAttack, "夹攻"); |
||||
CloneTypeDic.Add(CloneObjType.JointAttack, "合击"); |
||||
|
||||
CloneTypeDic.Add(CloneObjType.UVA, "无人机"); |
||||
CloneTypeDic.Add(CloneObjType.MonitorBall, "布控球"); |
||||
CloneTypeDic.Add(CloneObjType.MeshSolider, "mesh单兵"); |
||||
CloneTypeDic.Add(CloneObjType.FourGSolider, "4g单兵图传"); |
||||
CloneTypeDic.Add(CloneObjType.DigitalInterphone, "数字对讲机"); |
||||
CloneTypeDic.Add(CloneObjType.FourGBS, "4g基站"); |
||||
CloneTypeDic.Add(CloneObjType.VoiceReplayStation, "语音中继台"); |
||||
CloneTypeDic.Add(CloneObjType.PortableSateLliteStation, "卫星便携站"); |
||||
CloneTypeDic.Add(CloneObjType.PaintingLanguagePlatform, "语绘平台"); |
||||
CloneTypeDic.Add(CloneObjType.MeshRelaying, "mesh中继"); |
||||
CloneTypeDic.Add(CloneObjType.SignalBox, "信号塔"); |
||||
|
||||
CloneTypeDic.Add(CloneObjType.Cruiser, "巡逻车"); |
||||
CloneTypeDic.Add(CloneObjType.Motorbike, "摩托车"); |
||||
CloneTypeDic.Add(CloneObjType.Ambulance, "救护车"); |
||||
CloneTypeDic.Add(CloneObjType.PatrolWagon, "警车"); |
||||
CloneTypeDic.Add(CloneObjType.ElectricRepairCar, "电力抢修车"); |
||||
CloneTypeDic.Add(CloneObjType.GasRepairCar, "燃气抢修车"); |
||||
CloneTypeDic.Add(CloneObjType.WaterSupplyRepairCar, "供水抢修车"); |
||||
CloneTypeDic.Add(CloneObjType.EnvironmentalTestingVehicle, "环保检测车"); |
||||
CloneTypeDic.Add(CloneObjType.TransportVehicle, "交通运输车"); |
||||
CloneTypeDic.Add(CloneObjType.SanitartPreventionVehicle, "卫生防疫车"); |
||||
CloneTypeDic.Add(CloneObjType.EmergencyCommunicationVehicle, "应急通讯车"); |
||||
CloneTypeDic.Add(CloneObjType.FamilyCar, "家庭轿车"); |
||||
CloneTypeDic.Add(CloneObjType.EnterpriseMechanic, "企业技工"); |
||||
CloneTypeDic.Add(CloneObjType.PublicSecurity, "保安"); |
||||
CloneTypeDic.Add(CloneObjType.OfficeClerk, "职员"); |
||||
CloneTypeDic.Add(CloneObjType.Manager, "经理"); |
||||
CloneTypeDic.Add(CloneObjType.TechnicalEngineer, "技术工程师"); |
||||
CloneTypeDic.Add(CloneObjType.Doctor, "医生"); |
||||
|
||||
} |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: b9e79d9d52924c24abfeef77eb7fdca6 |
@ -0,0 +1,16 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
/// <summary> |
||||
/// 该脚本挂在点击可实例化物体的模型上 |
||||
/// 选择该模型上具体可实例化的Clone类型 |
||||
/// </summary> |
||||
[DisallowMultipleComponent] |
||||
public class CloneableEnums : MonoBehaviour { |
||||
|
||||
public List<CloneObjType> CloneableTypes = new List<CloneObjType>(); |
||||
|
||||
//是否处理克隆操作点击碰撞的点 |
||||
public bool isHandleCloneHitPoint; |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 1c0e57298488ae54aba3ef60b0b26920 |
@ -0,0 +1,20 @@
|
||||
using System; |
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public class EvacuatePoint : MonoBehaviour |
||||
{ |
||||
public static List<Vector3> evacuatePoints = new List<Vector3>(); |
||||
|
||||
private void Awake() |
||||
{ |
||||
evacuatePoints.Clear(); |
||||
} |
||||
|
||||
// Start is called before the first frame update |
||||
void Start() |
||||
{ |
||||
evacuatePoints.Add(transform.position); |
||||
} |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: d00f7578dda0a1c41b151766a6426479 |
@ -0,0 +1,15 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public class FloorMessage : MonoBehaviour |
||||
{ |
||||
// Use this for initialization |
||||
//使用方法:将脚本挂在场景中每一层的室内结构和室外结构的父对象上 |
||||
//功能:记录建筑每层结构的层信息 |
||||
|
||||
public string buildNum;//楼号 |
||||
public int floorNum;//层号 |
||||
public int interlayerNum;//夹层号,0表示不是夹层,1表示第一个夹层 |
||||
public Transform targetTrans;//切楼层时候用来定位的目标点 |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 7eb663056acb2644698df34826b5c60f |
@ -0,0 +1,38 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public class GetAreaTargetManager : MonoBehaviour |
||||
{ |
||||
public Vector3 cameraInitPos = new Vector3();//相机Target初始位置 |
||||
public float initDis;//相机离Target距离的初始值 |
||||
public float init_X;//相机水平旋转初始值 |
||||
public float init_Y;//相机竖直旋转初始值 |
||||
|
||||
public static GetAreaTargetManager Instance; |
||||
[SerializeField] |
||||
private List<Transform> children; |
||||
private void Awake() |
||||
{ |
||||
children = new List<Transform>(); |
||||
foreach (Transform item in transform) |
||||
{ |
||||
children.Add(item); |
||||
} |
||||
Instance = this; |
||||
} |
||||
public Transform GetTarget(string name) |
||||
{ |
||||
Transform result = null; |
||||
foreach (var item in children) |
||||
{ |
||||
if (item.name == name) |
||||
{ |
||||
result = item; |
||||
break; |
||||
} |
||||
} |
||||
|
||||
return result; |
||||
} |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: ad1ddb7b6b473ac4ea26f44aea624e2b |
@ -0,0 +1,51 @@
|
||||
using UnityEngine; |
||||
using System.Collections; |
||||
|
||||
public class LoadShader : MonoBehaviour |
||||
{ |
||||
// Start is called once before the first execution of Update after the MonoBehaviour is created |
||||
void Start() |
||||
{ |
||||
#if !UNITY_WEBGL || UNITY_EDITOR |
||||
SetShader(transform); |
||||
#endif |
||||
} |
||||
|
||||
// Update is called once per frame |
||||
void Update() |
||||
{ |
||||
|
||||
} |
||||
public void SetShader(Transform child) |
||||
{ |
||||
if (child.childCount > 0) |
||||
{ |
||||
for (int i = 0; i < child.childCount; i++) |
||||
{ |
||||
SetShader(child.GetChild(i)); |
||||
} |
||||
} |
||||
else |
||||
{ |
||||
if (child.GetComponent<Renderer>()) |
||||
{ |
||||
var r = child.GetComponent<Renderer>(); |
||||
foreach (var material in r.materials) |
||||
{ |
||||
//Debug.Log(material.shader.name); |
||||
if (material.shader.name == "Universal Render Pipeline/Lit") |
||||
{ |
||||
StartCoroutine(setshader(material)); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
IEnumerator setshader(Material m) |
||||
{ |
||||
m.shader = null; |
||||
yield return new WaitForSeconds(0.1f); |
||||
m.shader = Shader.Find("Universal Render Pipeline/Lit"); |
||||
} |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 5627e6832e9378c4e8632a52efa22183 |
@ -0,0 +1,18 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public class PathFindable : MonoBehaviour |
||||
{ |
||||
// Start is called before the first frame update |
||||
void Start() |
||||
{ |
||||
|
||||
} |
||||
|
||||
// Update is called once per frame |
||||
void Update() |
||||
{ |
||||
|
||||
} |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 43929be615d468749bba2f9917117a45 |
@ -0,0 +1,9 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
public class TeamTargetItem : MonoBehaviour |
||||
{ |
||||
public List<string> TaskNames; |
||||
public string TankName; |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: 408648110f0742348a48d10da40f3ea5 |
@ -0,0 +1,52 @@
|
||||
using System.Collections; |
||||
using System.Collections.Generic; |
||||
using UnityEngine; |
||||
|
||||
/// <summary> |
||||
/// 组任务目标点管理 |
||||
/// </summary> |
||||
public class TeamTargetManager : MonoBehaviour |
||||
{ |
||||
public static TeamTargetManager instance; |
||||
|
||||
private void Awake() |
||||
{ |
||||
instance = this; |
||||
} |
||||
|
||||
public static TeamTargetManager GetInstance |
||||
{ |
||||
get |
||||
{ |
||||
if (instance == null) |
||||
{ |
||||
string path = "TeamTargetParent"; |
||||
GameObject obj = Resources.Load<GameObject>(path); |
||||
GameObject clone = Instantiate(obj); |
||||
clone.name = "TeamTargetParent"; |
||||
instance = clone.GetComponent<TeamTargetManager>(); |
||||
} |
||||
return instance; |
||||
} |
||||
} |
||||
/// <summary> |
||||
/// 罐区类组任务获取目标点 |
||||
/// </summary> |
||||
/// <param name="taskName">任务名称</param> |
||||
/// <param name="tankName">罐区名称</param> |
||||
/// <returns></returns> |
||||
public Vector3 GetTargetPos(string taskName, string tankName) |
||||
{ |
||||
Vector3 pos = Vector3.zero; |
||||
foreach (Transform item in transform) |
||||
{ |
||||
if (item.GetComponent<TeamTargetItem>().TaskNames.Contains(taskName) && |
||||
item.GetComponent<TeamTargetItem>().TankName == tankName) |
||||
{ |
||||
pos = item.position; |
||||
break; |
||||
} |
||||
} |
||||
return pos; |
||||
} |
||||
} |
@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2 |
||||
guid: de3dcbb1284b2394a8049095e2bae278 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue