private bool CheckPos(ObjectPos woodpos) { if (SolidBoxList.ContainsKey(woodpos)) { return(false); } if (IceList.ContainsKey(woodpos)) { return(false); } if (PitfulList.ContainsKey(woodpos)) { return(false); } if (WoodBoxList.ContainsKey(woodpos)) { return(false); } if (ItemList.ContainsKey(woodpos)) { return(false); } if (SpecialPointList.ContainsKey(woodpos)) { return(false); } return(true); }
private bool checkPosition(ObjectPos pos) { if (WoodBoxList.ContainsKey(pos)) { return(false); } if (SolidBoxList.ContainsKey(pos)) { return(false); } if (SpecialBoxList.ContainsKey(pos)) { return(false); } if (ItemList.ContainsKey(pos)) { return(false); } if (IceList.ContainsKey(pos)) { return(false); } if (BaseList.ContainsKey(pos)) { return(false); } return(true); }
private bool checkPos(int i, int j) { firePos.x = i; firePos.y = j; if (WoodBoxList.ContainsKey(firePos)) { return(false); } if (SolidBoxList.ContainsKey(firePos)) { return(false); } if (BaseList.ContainsKey(firePos)) { return(false); } if (IceList.ContainsKey(firePos)) { return(false); } return(true); }
void OnDestroy() { if (GameOver) { return; } var pos = GetComponent <Transform> ().position; itempos.x = pos.x; itempos.y = pos.y; WoodBoxList.Remove(itempos); GameObject item = (GameObject)Instantiate(prefab [0], pos, Quaternion.identity); if (ItemSpecial) { item.GetComponent <ItemAttribute> ().SetItemNumber(10); } else { item.GetComponent <ItemAttribute> ().SetItemNumber(0); } ItemList [itempos] = item; }
private int destroyItem(Vector3 nextpos, int leftRange) { GameObject fire = (GameObject)Instantiate(prefab [0], nextpos, Quaternion.identity); objectPos.x = nextpos.x; objectPos.y = nextpos.y; if (WoodBoxList.ContainsKey(objectPos)) { Destroy(WoodBoxList[objectPos]); leftRange = 1; } if (SpecialBoxList.ContainsKey(objectPos)) { Destroy(SpecialBoxList[objectPos]); leftRange = 1; } if (BombList.ContainsKey(objectPos)) { Destroy(BombList[objectPos]); } if (ItemList.ContainsKey(objectPos)) { var ItemNumber = ItemList [objectPos].GetComponent <ItemAttribute> ().GetItemNumber(); if (ItemNumber != 8 && ItemNumber != 9) { Destroy(ItemList [objectPos]); } } if (BaseList.ContainsKey(objectPos)) { BaseList [objectPos].GetComponent <BaseAttribute> ().DamageBase(); } destroyPlayer(objectPos.x, objectPos.y); nextpos.y++; leftRange--; return(leftRange); }