//--------------------------------------- // 位置座標Zを配列座標に変換して返す //--------------------------------------- protected int getArrayNumZ(int value) { int ret = value % size.getMapSizeZ(); if (ret < 0) { ret += size.getMapSizeZ(); } return(ret); }
private bool isMapAppropriate; // プレイヤーがそのマップで移動可能かどうかの判定 //--------------------------------------- // constructor //--------------------------------------- public MapArrayFloor(string name, C21_MapSize size, C22_MapAxis axis) : base(name, size, axis) //配列の確保とfalseに初期化 { enemyFolder = new GameObject("EnemyFolder"); isMapAppropriate = false; isMoveArea = new bool[size.getMapSizeX(), size.getMapSizeZ()]; for (int z = 0; z < size.getMapSizeZ(); z++) { for (int x = 0; x < size.getMapSizeX(); x++) { isMoveArea[x, z] = false; } } }
protected int SIGN; // 符号 //--------------------------------------- // constructor //--------------------------------------- public C23_MapArray(string name, C21_MapSize size, C22_MapAxis axis) { this.name = name; this.folder = new GameObject(this.name + "_Folder"); this.array = new GameObject[size.getMapSizeX(), size.getMapSizeZ()]; this.size = size; this.axis = axis; this.SIGN = 1; }