public static Vector3 GetShipOffsPos(ShipModel_Battle model, bool isDamaged, MstShipGraphColumn iColumn) { bool damaged = model.IsFriend() ? isDamaged : (model.IsPractice() && isDamaged); switch (iColumn) { case MstShipGraphColumn.Foot: return(Util.Poi2Vec(model.Offsets.GetFoot_InBattle(damaged))); case MstShipGraphColumn.PointOfGaze: return(Util.Poi2Vec(model.Offsets.GetPog_InBattle(damaged))); case MstShipGraphColumn.SPPointOfGaze: return((!model.IsPractice() || model.IsFriend()) ? Util.Poi2Vec(model.Offsets.GetPogSp_InBattle(damaged)) : Util.Poi2Vec(model.Offsets.GetPogSpEnsyu_InBattle(damaged))); case MstShipGraphColumn.CutIn: return(Util.Poi2Vec(model.Offsets.GetCutin_InBattle(damaged))); case MstShipGraphColumn.CutInSp1: return(Util.Poi2Vec(model.Offsets.GetCutinSp1_InBattle(damaged))); default: return(Vector3.zero); } }
public static Vector3 GetShipOffsPos(ShipModel_Attacker model, MstShipGraphColumn iColumn) { if (model == null) { return(Vector3.zero); } return(GetShipOffsPos(model.GetGraphicsMstId(), model.IsFriend(), model.DamagedFlg, iColumn)); }
public static Vector3 GetShipOffsPos(int graphicsMstId, bool isFriend, bool isDamaged, MstShipGraphColumn iColumn) { Vector3 zero = Vector3.zero; Mst_shipgraphbattle mst_shipgraphbattle = Mst_DataManager.Instance.Mst_shipgraphbattle[graphicsMstId]; switch (iColumn) { case MstShipGraphColumn.Foot: if (isFriend && isDamaged) { zero.x = mst_shipgraphbattle.Foot_d_x; zero.y = mst_shipgraphbattle.Foot_d_y; } else { zero.x = mst_shipgraphbattle.Foot_x; zero.y = mst_shipgraphbattle.Foot_y; } break; case MstShipGraphColumn.CutIn: if (isFriend && isDamaged) { zero.x = mst_shipgraphbattle.Cutin_d_x; zero.y = mst_shipgraphbattle.Cutin_d_y; } else { zero.x = mst_shipgraphbattle.Cutin_x; zero.y = mst_shipgraphbattle.Cutin_y; } break; case MstShipGraphColumn.CutInSp1: if (isFriend && isDamaged) { zero.x = mst_shipgraphbattle.Cutin_sp1_d_x; zero.y = mst_shipgraphbattle.Cutin_sp1_d_y; } else { zero.x = mst_shipgraphbattle.Cutin_sp1_x; zero.y = mst_shipgraphbattle.Cutin_sp1_y; } break; case MstShipGraphColumn.PointOfGaze: if (isFriend && isDamaged) { zero.x = mst_shipgraphbattle.Pog_d_x; zero.y = mst_shipgraphbattle.Pog_d_y; } else { zero.x = mst_shipgraphbattle.Pog_x; zero.y = mst_shipgraphbattle.Pog_y; } break; case MstShipGraphColumn.SPPointOfGaze: if (isFriend && isDamaged) { zero.x = mst_shipgraphbattle.Pog_sp_d_x; zero.y = mst_shipgraphbattle.Pog_sp_d_y; } else { zero.x = mst_shipgraphbattle.Pog_sp_x; zero.y = mst_shipgraphbattle.Pog_sp_y; } break; } zero.z = 0f; return(zero); }
public static List <Vector3> GetShipOffsPos2Sinking(ShipModel_Defender model, bool isRepair, MstShipGraphColumn iColumn) { List <Vector3> list = new List <Vector3>(); list.Add(GetShipOffsPos(model, model.DamagedFlgBefore, iColumn)); list.Add(GetShipOffsPos(model, (!isRepair) ? model.DamagedFlgAfter : model.DamagedFlgAfterRecovery, iColumn)); return(list); }
public static Vector3 GetShipOffsPos(ShipModel_Defender model, DamageState_Battle damageState, MstShipGraphColumn iColumn) { if (model == null) { return(Vector3.zero); } bool isDamaged = false; if (damageState == DamageState_Battle.Tyuuha || damageState == DamageState_Battle.Taiha || damageState == DamageState_Battle.Gekichin) { isDamaged = true; } return(GetShipOffsPos(model.GetGraphicsMstId(), model.IsFriend(), isDamaged, iColumn)); }