public void SetPetLife(PetInfo Info, LifeEnvironment Environment) { if (Info == null) { return; } }
protected GameObject AttackRangeSemiCircle02; //攻击范围 光效半圆环 循环 public void SetBuildLife(BuildInfo Info, LifeProperty SkinProperty, LifeEnvironment Environment) { if (Info == null || SkinProperty == null) { return; } LifeProperty(SkinProperty); if (Info.m_Skill != null) { m_Skill = new BuildSkill(Info); } if (Environment == LifeEnvironment.Combat) { //初始化技能 m_Attr = new BuildAttribute(Info); m_Status = new Status(); BuildColider bc = this.GetComponent <BuildColider>(); if (bc != null && m_Attr.IsDamage) { bc.EnableBattleCollider(true); } } else { //HideHp(); SetEditModeSetting(Info, Environment); } }
public void SetWallLife(WallInfo Info, LifeEnvironment Environment) { if (Info == null) { return; } }
public void SetSummonPetLife(SummonpetInfo Info, LifeProperty SkinProperty, LifeEnvironment Environment) { if (Info == null || SkinProperty == null) { return; } LifeProperty(SkinProperty); if (Environment == LifeEnvironment.Combat) { } else { } }
public override void SetEditModeSetting(BuildInfo Info, LifeEnvironment Environment) { //base.SetEditModeSetting(Info ,Environment); if (m_Property != null) { //(m_Property as Building1605_h).m_goEffectRoot = m_thisT.gameObject; if (go1903011 == null) { InitBuildModel(); } go1903041.AddComponent <NdHide>().ResetDuration(1000000f); go1903041.SetActive(false); } Int2 Pos = new Int2(Info.m_ShipPutdata0, Info.m_ShipPutdata1); Int2 grid = new Int2(Pos.Unit, Pos.Layer); GateGrid = grid; SetTransGate(grid); }
/// <summary> /// 编辑模式下,建筑设置。 /// </summary> public virtual void SetEditModeSetting(BuildInfo Info, LifeEnvironment Environment) { SetAnimator(Build_AnimatorState.EditStand11000); }
/// <summary> /// 加入buildlife 与lifeobj的关联 /// </summary> /// <param name="BuildSkin">建筑物对象表现实体</param> /// <param name="Info">建筑物信息</param> /// <param name="DataID">战斗环境中的DataID,其他环境填0 就可</param> /// <param name="Environment">对象所出环境</param> private static Building ConnectBuildingLife(LifeProperty SkinProperty, BuildInfo Info, int DataID, LifeEnvironment Environment) { if (SkinProperty == null) { return(null); } Building buildlife = GetBuildingLife(Info, SkinProperty, Environment); if (SkinProperty != null) { if (Environment == LifeEnvironment.Combat) { bool IsPlayer = CmCarbon.GetCamp2Player(LifeMCamp.DEFENSE); buildlife.SetLifeCore(new LifeMCore(DataID, IsPlayer, LifeMType.BUILD, LifeMCamp.DEFENSE, MoveState.Static)); } } return(buildlife); }
/// <summary> /// Role 与lifeobj的关联 /// </summary> /// <param name="t">角色对象的Transform</param> /// <param name="Info">角色信息</param> /// <param name="Camp">阵营</param> /// <param name="DataID">战斗环境中的DataID,其他环境填0 就可</param> /// <param name="moveState">运动状态</param> /// <param name="Environment">对象所出环境</param> public static Role ConnectRoleLife(Transform Tstart, AnimatorState state, SoldierInfo Info, LifeMCamp Camp, int DataID, MoveState moveState, Int2 BornPos, LifeEnvironment Environment) { Role RoleLife = new Role(); bool IsPlayer = CmCarbon.GetCamp2Player(Camp); int RoleType = Info.m_modeltype; if (RoleType == 102003) { RoleType = 1020032; } if (RoleType == 200009) { RoleType = 2000092; } RoleLife.CreateSkin(Tstart, RoleType, Info.m_name, state, IsPlayer); RoleLife.SetRoleLife(Info, RoleLife.RoleSkinCom.ProPerty, Environment); LifeObj building = RoleLife.RoleSkinCom.tRoot.gameObject.AddComponent <LifeObj>(); if (building != null) { if (Environment == LifeEnvironment.Combat) { RoleLife.SetLifeCore(new LifeMCore(DataID, IsPlayer, LifeMType.SOLDIER, Camp, moveState)); RoleLife.SetSkin(); } if (moveState == MoveState.Walk) { RoleLife.MoveAI.SetBornPos(BornPos, 0); } building.SetLife(RoleLife as Life, RoleLife.RoleSkinCom.ProPerty); } return(RoleLife); }
/// <summary> /// 创建房间 /// </summary> /// <param name="Info">炮弹兵信息</param> /// <param name="Camp">阵营</param> /// <param name="DataID">战斗环境中的DataID,其他环境填0 就可</param> /// <param name="moveState">运动状态</param> /// <param name="iRole">iRole</param> /// <returns></returns> public static Role CreateRole(Transform Tstart, AnimatorState state, SoldierInfo Info, LifeMCamp Camp, int DataID, MoveState moveState, Int2 BornPos, LifeEnvironment Environment) { if (Info == null) { return(null); } return(ConnectRoleLife(Tstart, state, Info, Camp, DataID, moveState, BornPos, Environment)); }
/// <summary> /// 创建房间 /// </summary> /// <param name="Info">建筑数据</param> /// <param name="DataID">战斗环境中的DataID,其他环境填0 就可</param> /// <param name="Parent">挂载点</param> /// <param name="Parent">环境</param> /// <returns></returns> public static Building CreateBuilding(BuildInfo Info, int DataID, Transform Parent, Vector3 WorldPos, LifeEnvironment Environment) { Life.Environment = Environment; if (Info == null || Parent == null) { return(null); } LifeProperty Property = CreateBuildSkin(Info, Parent, WorldPos); if (Property == null) { return(null); } Building buildlife = ConnectBuildingLife(Property, Info, DataID, Environment); LifeObj building = Property.transform.parent.gameObject.AddComponent <LifeObj>(); if (Property != null && building != null) { building.SetLife(buildlife as Life, Property); } return(buildlife); }
private static Building GetBuildingLife(BuildInfo Info, LifeProperty SkinProperty, LifeEnvironment Environment) { if (Info == null || SkinProperty == null) { return(null); } Building life = null; switch (Info.BuildType) { case 1201: life = new Building1201(); break; case 1300: life = new Building1300(); break; case 1601: life = new Building1601(); break; case 1602: life = new Building1602(); break; case 1603: life = new Building1603(); break; case 1604: life = new Building1604(); break; case 1605: life = new Building1605(); break; case 1606: life = new Building1606(); break; case 1607: life = new Building1607(); break; case 1608: life = new Building1608(); break; case 1609: life = new Building1609(); break; case 1610: life = new Building1610(); break; case 1611: life = new Building1611(); break; case 1612: life = new Building1612(); break; case 1613: life = new Building1613(); break; case 1619: life = new Building1619(); break; case 9999: life = new Building9999(); break; case 9998: life = new Building9998(); break; case 9997: life = new Building9997(); break; default: break; } if (life != null) { life.SetBuildLife(Info, SkinProperty, Environment); life.InitBuildModel(); } else { Debug.Log("create building fail:" + Info.BuildType); } return(life); }
public void SetFloorLife(FloorInfo Info, LifeEnvironment Environment) { if (Info == null) { return ; } }