本文整理汇总了C#中Photo.getActivityOwnerInfo方法的典型用法代码示例。如果您正苦于以下问题:C# Photo.getActivityOwnerInfo方法的具体用法?C# Photo.getActivityOwnerInfo怎么用?C# Photo.getActivityOwnerInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Photo
的用法示例。
在下文中一共展示了Photo.getActivityOwnerInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: producePhotoRender
public GameObject producePhotoRender(string para_photoGObjStringName,
Photo para_photoDetails,
float para_maxFontCharSize,
Vector3 para_photoSpawnPt,
float para_photoWidth,
float para_photoHeight,
Vector3 para_photoRotAngles)
{
// Extract Details.
int areaTypeID = para_photoDetails.getPhotoAreaTypeID();
int areaBackgroundID = para_photoDetails.getPhotoAreaBackgroundID();
PhotoCharacterElement questGiverInfo = para_photoDetails.getQuestGiverInfo();
PhotoCharacterElement activityOwnerInfo = para_photoDetails.getActivityOwnerInfo();
PlayerAvatarSettings playerAvSettings = para_photoDetails.getPlayerAvatarInfo();
string boardText = para_photoDetails.getBoardText();
// Select and create photo backbone.
string areaTypeIDString = ""+areaTypeID;
string areaBackgroundIDString = ""+areaBackgroundID;
if((areaTypeID < 0)||(areaTypeID > 8))
{
areaTypeIDString = "W";
}
if(areaBackgroundID < 0)
{
areaBackgroundIDString = "0";
}
string pathToPhotoGuide = "Prefabs/PhotoBackbones/Area_"+areaTypeIDString+"/Area"+areaTypeIDString+"_Setup"+areaBackgroundIDString;
Transform reqPhotoBackbone = Resources.Load<Transform>(pathToPhotoGuide);
if(reqPhotoBackbone == null)
{
// Do something if photo guide not found.
return null;
}
else
{
Rect worldSpawnBounds = new Rect(para_photoSpawnPt.x - (para_photoWidth/2f),
para_photoSpawnPt.y + (para_photoHeight/2f),
para_photoWidth,
para_photoHeight);
GameObject guideBackground = reqPhotoBackbone.FindChild("PhotoBackground").gameObject;
float nwXScale = worldSpawnBounds.width / guideBackground.renderer.bounds.size.x;
float nwYScale = worldSpawnBounds.height / guideBackground.renderer.bounds.size.y;
//GameObject nwPhotoBackbone = WorldSpawnHelper.initObjWithinWorldBounds(reqPhotoBackbone,para_photoGObjStringName,worldSpawnBounds,para_photoSpawnPt.z,new bool[]{false,true,false});
GameObject nwPhotoBackbone = ((Transform) MonoBehaviour.Instantiate(reqPhotoBackbone,para_photoSpawnPt,Quaternion.identity)).gameObject;
nwPhotoBackbone.name = para_photoGObjStringName;
// Find,replace and setup characters in the photo.
Transform questGiverGuide = nwPhotoBackbone.transform.FindChild("QuestGiver");
Transform activityOwnerGuide = nwPhotoBackbone.transform.FindChild("ActivityOwner");
Transform playerAvatarGuide = nwPhotoBackbone.transform.FindChild("PlayerAvatar");
Transform noticeBoardTAGuide = nwPhotoBackbone.transform.FindChild("PhotoNoticeBoard").FindChild("BoardTextArea");
questGiverGuide.parent = null;
activityOwnerGuide.parent = null;
playerAvatarGuide.parent = null;
noticeBoardTAGuide.parent = null;
questGiverGuide.name += "Guide";
activityOwnerGuide.name += "Guide";
playerAvatarGuide.name += "Guide";
//GhostbookManagerLight gbMang = GhostbookManagerLight.getInstance();
int questGiverID = questGiverInfo.getCharacterID();
int activityOwnerID = activityOwnerInfo.getCharacterID();
Transform questGiverPrefab;
if(questGiverID < 9)
{
string artNumber = "0"+(questGiverID+1);
questGiverPrefab = Resources.Load<Transform>("Prefabs/AvatarsBigVersions/Big_PCs/Big_PC"+artNumber);
}
else
{
int tmpArtNum = ((questGiverID - 9)+1);
string artNumber = ""+tmpArtNum;
if(tmpArtNum < 10) { artNumber = "0" + artNumber; }
questGiverPrefab = Resources.Load<Transform>("Prefabs/AvatarsBigVersions/Big_SCs/Big_SC"+artNumber);
}
Transform activityOwnerPrefab = null;
if(questGiverID != activityOwnerID)
{
string artNumber = "0"+(activityOwnerID+1);
activityOwnerPrefab = Resources.Load<Transform>("Prefabs/AvatarsBigVersions/Big_PCs/Big_PC"+artNumber);
}
Transform playerAvatarBasePrefab = Resources.Load<Transform>("Prefabs/AvatarsBigVersions/Big_AVs/Big_AV01"); //Resources.Load<Transform>("Prefabs/Avatars/MainAvatar01");
Transform wordBoxPrefab = Resources.Load<Transform>("Prefabs/GenericWordBox");
// Render player avatar in photo.
Transform nwPlayerAvObj = (Transform) MonoBehaviour.Instantiate(playerAvatarBasePrefab,playerAvatarGuide.position,Quaternion.identity);
nwPlayerAvObj.name = "PlayerAvatar";
MonoBehaviour.DestroyImmediate(nwPlayerAvObj.GetComponent<Animator>());
//.........这里部分代码省略.........