Drought.Entity.MovableEntity.update C# (CSharp) Method

update() public method

public update ( ) : void
return void
        public virtual void update()
        {
            prevHasMoved = hasMoved;
            hasMoved = false;
            if (!isDead())
            {
                move();
                pathTool.setPointsList(path.getRemainingPath());
            }
            if (selected)
            {
                if (hasMoved)
                    rebuildRing();
                selectTime += selectTimeStep;
                if (selectTime > 1) selectTime = 1;
            }
            else
            {
                selectTime -= selectTimeStep;
                if (selectTime < 0) selectTime = 0;
            }

            infoBar.update(position, selectTime, health, maxHealth, (int)water/1000, (int)maxWater/1000);
        }