本文整理汇总了C#中Stage.getStageMap方法的典型用法代码示例。如果您正苦于以下问题:C# Stage.getStageMap方法的具体用法?C# Stage.getStageMap怎么用?C# Stage.getStageMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Stage
的用法示例。
在下文中一共展示了Stage.getStageMap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
// Use this for initialization
void Start () {
//Dinamic Map
activeKuniId = PlayerPrefs.GetInt("activeKuniId");
activeStageId = PlayerPrefs.GetInt("activeStageId");
Stage stage = new Stage ();
if (activeStageId != 0) {
//Active
int stageMapId = stage.getStageMap (activeKuniId, activeStageId);
string mapPath = "";
string mapFrontPath = "";
Instantiate (wallPrefab);
if (stageMapId != 1) {
if (stageMapId == 2) {
//mountain
mapPath = "Prefabs/PreKassen/map2";
GameObject map = Instantiate (Resources.Load (mapPath)) as GameObject;
mapFrontPath = "Prefabs/PreKassen/mapFront2";
GameObject mapFront = Instantiate (Resources.Load (mapFrontPath)) as GameObject;
weatherHandling(stageMapId, map, mapFront);
} else if (stageMapId == 3) {
//sea
mapPath = "Prefabs/PreKassen/map3";
GameObject map = Instantiate (Resources.Load (mapPath)) as GameObject;
mapFrontPath = "Prefabs/PreKassen/mapFront3";
GameObject mapFront = Instantiate (Resources.Load (mapFrontPath)) as GameObject;
weatherHandling(stageMapId, map, mapFront);
}
} else {
Instantiate (treePrefab);
mapPath = "Prefabs/PreKassen/map1";
GameObject map = Instantiate (Resources.Load (mapPath)) as GameObject;
weatherHandling(stageMapId, map, null);
}
} else {
//Passive
int stageMapId = stage.getStageMap (activeKuniId, 10);
string mapPath = "";
string mapFrontPath = "";
Instantiate (wallPrefab);
if (stageMapId != 1) {
if (stageMapId == 2) {
//mountain
mapPath = "Prefabs/PreKassen/map2";
GameObject map = Instantiate (Resources.Load (mapPath)) as GameObject;
mapFrontPath = "Prefabs/PreKassen/mapFront2";
GameObject mapFront = Instantiate (Resources.Load (mapFrontPath)) as GameObject;
weatherHandling(stageMapId, map, mapFront);
} else if (stageMapId == 3) {
//sea
mapPath = "Prefabs/PreKassen/map3";
GameObject map = Instantiate (Resources.Load (mapPath)) as GameObject;
mapFrontPath = "Prefabs/PreKassen/mapFront3";
GameObject mapFront = Instantiate (Resources.Load (mapFrontPath)) as GameObject;
weatherHandling(stageMapId, map, mapFront);
}
} else {
Instantiate (mapPrefab);
Instantiate (treePrefab);
weatherHandling(stageMapId, mapPrefab, null);
}
}
/*Get Minus Status*/
float mntMinusRatio = PlayerPrefs.GetFloat("mntMinusStatus",0);
float seaMinusRatio = PlayerPrefs.GetFloat("seaMinusStatus",0);
float rainMinusRatio = PlayerPrefs.GetFloat("rainMinusStatus",0);
float snowMinusRatio = PlayerPrefs.GetFloat("snowMinusStatus",0);
/*プレイヤー配置*/
//ユーザ陣形データのロード
int jinkei =PlayerPrefs.GetInt("jinkei",0);
List<int> myBusyoList = new List<int> ();
//1.魚麟
if (jinkei == 1) {
soudaisyo = PlayerPrefs.GetInt("soudaisyo1");
//.........这里部分代码省略.........
示例2: Start
void Start () {
//Stage Name
string stageName = PlayerPrefs.GetString("activeStageName");
GameObject.Find ("KassenNameValue").GetComponent<Text> ().text = stageName + "の戦い";
//Wether Handling
int weatherId = getWeatherId();
Color rainSnowColor = new Color (140f / 255f, 140f / 255f, 140f / 255f, 255f / 255f);
//if passive kassen
isAttackedFlg = PlayerPrefs.GetBool ("isAttackedFlg");
Stage stage = new Stage ();
int stageMapId = 0;
GameObject panel = GameObject.Find ("Panel").gameObject;
if (isAttackedFlg) {
//Passive
GameObject tettaiBtn = GameObject.Find ("TettaiBtn").gameObject;
GameObject hyourouIcon = GameObject.Find ("StartBtn").transform.FindChild ("hyourouIcon").gameObject;
Destroy (tettaiBtn.gameObject);
Destroy (hyourouIcon.gameObject);
int activeKuniId = PlayerPrefs.GetInt("activeKuniId");
stageMapId = stage.getStageMap (activeKuniId, 10);
string mapPath = "";
string mapFrontPath = "";
if (stageMapId != 1) {
GameObject frontImage = panel.transform.FindChild ("FrontImage").gameObject;
frontImage.GetComponent<Image> ().enabled = true;
if (stageMapId == 2) {
//mountain
mapPath = "Prefabs/PreKassen/map/map2";
panel.GetComponent<Image> ().sprite =
Resources.Load (mapPath, typeof(Sprite)) as Sprite;
mapFrontPath = "Prefabs/PreKassen/frontMap/mapFront2";
frontImage.GetComponent<Image> ().sprite =
Resources.Load (mapFrontPath, typeof(Sprite)) as Sprite;
if (weatherId == 2 || weatherId == 3) {
panel.GetComponent<Image> ().color = rainSnowColor;
frontImage.GetComponent<Image> ().color = rainSnowColor;
}
} else if (stageMapId == 3) {
//sea
mapPath = "Prefabs/PreKassen/map/map3";
panel.GetComponent<Image> ().sprite =
Resources.Load (mapPath, typeof(Sprite)) as Sprite;
mapFrontPath = "Prefabs/PreKassen/frontMap/mapFront3";
frontImage.GetComponent<Image> ().sprite =
Resources.Load (mapFrontPath, typeof(Sprite)) as Sprite;
if (weatherId == 2 || weatherId == 3) {
panel.GetComponent<Image> ().color = rainSnowColor;
frontImage.GetComponent<Image> ().color = rainSnowColor;
}
}
} else {
if (weatherId == 2 || weatherId == 3) {
panel.GetComponent<Image> ().color = rainSnowColor;
}
}
} else {
//Active
int activeKuniId = PlayerPrefs.GetInt("activeKuniId");
int activeStageId = PlayerPrefs.GetInt("activeStageId");
stageMapId = stage.getStageMap (activeKuniId, activeStageId);
string mapPath = "";
string mapFrontPath = "";
if (stageMapId != 1) {
GameObject frontImage = panel.transform.FindChild("FrontImage").gameObject;
frontImage.GetComponent<Image> ().enabled = true;
if (stageMapId == 2) {
//mountain
mapPath = "Prefabs/PreKassen/map/map2";
panel.GetComponent<Image> ().sprite =
Resources.Load (mapPath, typeof(Sprite)) as Sprite;
mapFrontPath = "Prefabs/PreKassen/frontMap/mapFront2";
frontImage.GetComponent<Image> ().sprite =
Resources.Load (mapFrontPath, typeof(Sprite)) as Sprite;
if (weatherId == 2 || weatherId == 3) {
panel.GetComponent<Image> ().color = rainSnowColor;
frontImage.GetComponent<Image> ().color = rainSnowColor;
}
//.........这里部分代码省略.........