Exemplo n.º 1
0
    public void logic(float dt)
    {
        if (isOut || isDead)
        {
            return;
        }

        movline += getProperty(AttributeData.AttrType.ATTR_SPEED) * dt;

        if (movline > manager.timeLine)
        {
            movline       = manager.timeLine;
            isBattleReady = true;
        }

        if (movIcon != null)
        {
            MoveHead head = movIcon.GetComponent <MoveHead> ();

            head.toMove(movline, manager.timeLine);

            if (isBattleReady)
            {
                head.setHighlight(true);
            }
            else
            {
                head.setHighlight(false);
            }
        }
    }