public static void SetObjectGetHurt(CObjectGetHurt objectGetHurt, GC_OBJGETHURT gcObjectGetHurt) { objectGetHurt.sceneId = gcObjectGetHurt.SceneId; objectGetHurt.objId = gcObjectGetHurt.ObjId; objectGetHurt.attackObjId = gcObjectGetHurt.AttackObjId; objectGetHurt.damage = gcObjectGetHurt.Damage; objectGetHurt.objDead = gcObjectGetHurt.ObjDead; objectGetHurt.deathNumber = gcObjectGetHurt.DeathNumber; }
public void ReceiveObjGetHurt(object parm) { LogModule.DebugLog("ReceiveObjGetHurt"); if (mBattleState != BattleState.prepare && mBattleState != BattleState.Start) { LogModule.DebugLog("AssetNotOk"); return; } CObjectGetHurt tObjHurt = GameFacade.GetProxy <BattleProxy>().ObjectGetHurt; if (mSceneID != tObjHurt.sceneId) { return; } mSquadGameObjDict[tObjHurt.objId].GetComponent <SquadController>().SetSquadHP(tObjHurt.damage, mSquadGameObjDict[tObjHurt.attackObjId].transform); if (tObjHurt.deathNumber != 0) { mSquadGameObjDict[tObjHurt.objId].GetComponent <SquadController>().UnitDie(tObjHurt.deathNumber, mSquadGameObjDict[tObjHurt.attackObjId].transform); } if (tObjHurt.objDead == 1) { mSquadGameObjDict[tObjHurt.objId].GetComponent <SquadController>().SquadDeath(); } }