Package cn.nukkit.entity.ai.sensor
Class EntityAttackedByOwnerSensor
java.lang.Object
cn.nukkit.entity.ai.sensor.EntityAttackedByOwnerSensor
- All Implemented Interfaces:
ISensor
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
返回此传感器的刷新周期,小的刷新周期会使得传感器被更频繁的调用void
sense
(EntityIntelligent entity)
-
Field Details
-
period
protected int period -
changeTarget
protected boolean changeTarget
-
-
Constructor Details
-
EntityAttackedByOwnerSensor
public EntityAttackedByOwnerSensor(int period, boolean changeTarget)
-
-
Method Details
-
sense
-
getPeriod
public int getPeriod()Description copied from interface:ISensor
返回此传感器的刷新周期,小的刷新周期会使得传感器被更频繁的调用Returns the refresh period of this sensor, a small refresh period will make the sensor be called more frequently
-