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); }
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); }