Implemented multi-mission sectors / Various bugfixes
This commit is contained in:
@@ -84,10 +84,7 @@ public class TileEntity extends BaseEntity implements TargetTrait{
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Call when nothing is happening to the entity.
|
||||
* This increments the internal sleep timer.
|
||||
*/
|
||||
/**Call when nothing is happening to the entity. This increments the internal sleep timer.*/
|
||||
public void sleep(){
|
||||
sleepTime += Timers.delta();
|
||||
if(!sleeping && sleepTime >= timeToSleep){
|
||||
@@ -97,20 +94,6 @@ public class TileEntity extends BaseEntity implements TargetTrait{
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Call when something just happened to the entity.
|
||||
* If the entity was sleeping, this enables it. This also resets the sleep timer.
|
||||
*/
|
||||
public void wakeUp(){
|
||||
noSleep();
|
||||
|
||||
for(Tile tile : proximity){
|
||||
if(tile.entity.isSleeping()){
|
||||
tile.entity.wakeUp();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**Call when this entity is updating. This wakes it up.*/
|
||||
public void noSleep(){
|
||||
sleepTime = 0f;
|
||||
|
||||
Reference in New Issue
Block a user