Пример #1
0
    //移动到某个实体
    public void TryMoveToTarget(entity t, bool isCmd)
    {
        if (baseUnit.dead)
        {
            return;
        }

        if (baseUnit.sta == STU.down)
        {
            return;
        }

        if (baseUnit.v3Dis(t) <= 3)
        {
            return;
        }

        stopMove();

        targetUnit          = t;
        baseUnit.targetGrid = t.grid;
        ai = AI.moveTo;
        op = OP.moving;

        PathFind.Instance.FindPath(GSceneMap.Instance.nodeFromGrid(baseUnit.grid), GSceneMap.Instance.nodeFromGrid(t.grid), ref path);

        if (isCmd)
        {
            reason = AIR.cmd;
            tick   = m_tickMax;
        }
    }
Пример #2
0
    //移动到某个位置
    public void moveTo(GridID v, bool isCmd)
    {
        if (baseUnit.dead)
        {
            return;
        }

        if (baseUnit.sta == STU.down)
        {
            return;
        }

        ai = AI.moveTo;
        op = OP.moving;

        stopMove();

        baseUnit.targetGrid = v;

        PathFind.Instance.FindPath(GSceneMap.Instance.nodeFromGrid(baseUnit.grid), GSceneMap.Instance.nodeFromGrid(baseUnit.targetGrid), ref path);

        if (isCmd)
        {
            reason = AIR.cmd;
            tick   = m_tickMax;
        }
    }
Пример #3
0
        public virtual string GetDataRow()
        {
            return(String.Join(",", new[]
            {
                FullTimeMode?Time.ToString() : Time.TotalSeconds.ToString(CultureInfo.InvariantCulture),
                    TRT.ToString(),
                    RPM.ToString(),
                    RPM40.ToString(),
                    RPM_GBC_RT.ToString(),
                    UFRXX.ToString(),
                    SSM.ToString(),
                    TWAT.ToString(),
                    TAIR.ToString(),
                    ALF.ToString("0.#", CultureInfo.InvariantCulture),
                    AFR.ToString("0.#", CultureInfo.InvariantCulture),
                    LC1_ALF.ToString("0.###", CultureInfo.InvariantCulture),
                    LC1_AFR.ToString("0.#", CultureInfo.InvariantCulture),
                    COEFF.ToString("0.###", CultureInfo.InvariantCulture),
                    DGTC_RICH.ToString("0.###", CultureInfo.InvariantCulture),
                    DGTC_LEAN.ToString("0.###", CultureInfo.InvariantCulture),
                    UOZ.ToString("0.#", CultureInfo.InvariantCulture),
                    KUOZ1.ToString("0.#", CultureInfo.InvariantCulture),
                    KUOZ2.ToString("0.#", CultureInfo.InvariantCulture),
                    KUOZ3.ToString("0.#", CultureInfo.InvariantCulture),
                    KUOZ4.ToString("0.#", CultureInfo.InvariantCulture),
                    Faza.ToString(),
                    INJ.ToString("0.###", CultureInfo.InvariantCulture),
                    FUSE.ToString("0.#", CultureInfo.InvariantCulture),
                    AIR.ToString("0.#", CultureInfo.InvariantCulture),
                    GBC.ToString("0.##", CultureInfo.InvariantCulture),
                    SPD.ToString(),
                    ADCKNOCK.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCMAF.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCTWAT.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCTAIR.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCTPS.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCUBAT.ToString("0.###", CultureInfo.InvariantCulture),
                    ADCLAM.ToString("0.###", CultureInfo.InvariantCulture),
                    ErrorCount.ToString(),
                    fSTOP ? "1" : "0",
                    fXX ? "1" : "0",
                    fXXPrev ? "1" : "0",
                    fXXFix ? "1" : "0",
                    fPOW ? "1" : "0",
                    fFUELOFF ? "1" : "0",
                    fDETZONE ? "1" : "0",
                    fDET ? "1" : "0",
                    fADS ? "1" : "0",
                    fLAMREG ? "1" : "0",
                    fLAM ? "1" : "0",
                    fLEARN ? "1" : "0",
                    fLAMRDY ? "1" : "0",
                    fLAMHEAT ? "1" : "0"
            }

                               ));
        }
Пример #4
0
    public void doMoveTo()
    {
        if (baseUnit.sta == STU.down)
        {
            return;
        }

        if (targetUnit != null)
        {
            moveToTarget();
        }
        else
        {
            if (MoveToPos())
            {
                ai     = AI.idle;
                op     = OP.idle;
                reason = AIR.none;
            }
        }
    }
Пример #5
0
    public void moveToTarget()
    {
        if (baseUnit.sta == STU.down)
        {
            return;
        }

        //Debug.Log("moveToTarget");
        if (baseUnit.dead || baseUnit.v3Dis(targetUnit) <= 3)
        {
            ai     = AI.idle;
            op     = OP.idle;
            reason = AIR.none;
            stopMove();
        }

        if (baseUnit.targetGrid != targetUnit.grid)
        {
            path.Clear();
            PathFind.Instance.FindPath(GSceneMap.Instance.nodeFromGrid(baseUnit.grid), GSceneMap.Instance.nodeFromGrid(targetUnit.grid), ref path);
            pathIndex = 0;
        }
    }
Пример #6
0
        public virtual string GetValue(string name)
        {
            //var property = type.GetProperty(name);
            //return property == null ? String.Empty : Convert.ToSingle(property.GetValue(this, null)).ToString("0.##");

            var j7EsDiagData = this as J7esDiagData;

            switch (name)
            {
            case "RPM":
                return(RPM.ToString(CultureInfo.InvariantCulture));

            case "UOZ":
                return(UOZ.ToString("0.#", CultureInfo.InvariantCulture));

            case "DUOZ":
                return(j7EsDiagData != null?j7EsDiagData.DUOZ.ToString("0.#", CultureInfo.InvariantCulture) : "-");

            case "TRT":
                return(TRT.ToString(CultureInfo.InvariantCulture));

            case "TWAT":
                return(TWAT.ToString(CultureInfo.InvariantCulture));

            case "TAIR":
                return(TAIR.ToString(CultureInfo.InvariantCulture));

            case "ALF":
                return(ALF.ToString("0.##", CultureInfo.InvariantCulture));

            case "LC1_ALF":
                return(LC1_ALF.ToString("0.##", CultureInfo.InvariantCulture));

            case "COEFF":
                return(COEFF.ToString("0.###", CultureInfo.InvariantCulture));

            case "INJ":
                return(INJ.ToString("0.###", CultureInfo.InvariantCulture));

            case "FUSE":
                return(FUSE.ToString("0.#", CultureInfo.InvariantCulture));

            case "AIR":
                return(AIR.ToString("0", CultureInfo.InvariantCulture));

            case "GBC":
                return(GBC.ToString("0", CultureInfo.InvariantCulture));

            case "SPD":
                return(SPD.ToString(CultureInfo.InvariantCulture));

            case "Press":
                return(j7EsDiagData != null?j7EsDiagData.Press.ToString("0.##", CultureInfo.InvariantCulture) : "-");

            case "TARGET_BOOST":
                return(j7EsDiagData != null?j7EsDiagData.TARGET_BOOST.ToString("0.##", CultureInfo.InvariantCulture) : "-");

            case "WGDC":
                return(j7EsDiagData != null?j7EsDiagData.WGDC.ToString(CultureInfo.InvariantCulture) : "-");

            case "TURBO_DYNAMICS":
                return(j7EsDiagData != null?j7EsDiagData.TURBO_DYNAMICS.ToString(CultureInfo.InvariantCulture) : "-");

            case "UGB_RXX":
                return(j7EsDiagData != null?j7EsDiagData.UGB_RXX.ToString("0.##", CultureInfo.InvariantCulture) : "-");

            default:
                return(String.Empty);
            }
        }