Exemplo n.º 1
0
    public override void ObjUpdate()
    {
        base.ObjUpdate();
        if (!isStart)
        {
            return;
        }

        moveTime += Time.deltaTime;
        float   rate = moveTime / maxTime;
        Vector3 pos  = startPos + (targetPos - startPos) * (rate);

        pos.y = GameCommon.JumpFormula(distance * rate, distance, distance * 0.3f, startPos.y);
        this.transform.position = pos;


        if (moveTime > maxTime)
        {
            state = enObjState.die;
            Bomb();
        }
        rotation          += 360 * Time.deltaTime;
        transform.rotation = Quaternion.Euler(rotation, 0, 0);
    }