public structures.memory findAndDeleteLatest(byte type) { int foundAt = -1; for (int i = list.Length - 1; i >= 0; i--) { if (list[i].type == type) { foundAt = i; break; } } structures.memory retour = new xycv_ppc.structures.memory(); if (foundAt != -1) { structures.memory[] buffer = new structures.memory[list.Length]; list = new structures.memory[buffer.Length - 1]; for (int i = foundAt; i < list.Length; i++) { list[i] = buffer[i + 1]; } for (int i = 0; i < foundAt; i++) { list[i] = buffer[i]; } } else { retour = new xycv_ppc.structures.memory(); retour.ind = new int[0]; } return(retour); }
public Memory( PlayerList olayer, int length ) { this.player = olayer; list = new structures.memory[ length ]; }
public Memory(PlayerList olayer, int length) { this.player = olayer; list = new structures.memory[length]; }
public structures.memory findAndDeleteLatest(byte type) { int foundAt = -1; for ( int i = list.Length - 1; i >= 0; i-- ) if ( list[ i ].type == type ) { foundAt = i; break; } structures.memory retour = new xycv_ppc.structures.memory(); if ( foundAt != -1 ) { structures.memory[] buffer = new structures.memory[ list.Length ]; list = new structures.memory[ buffer.Length - 1 ]; for ( int i = foundAt; i < list.Length; i++ ) list[ i ] = buffer[ i + 1 ]; for ( int i = 0; i < foundAt; i++ ) list[ i ] = buffer[ i ]; } else { retour = new xycv_ppc.structures.memory(); retour.ind = new int[ 0 ]; } return retour; }