Пример #1
0
    public void AfterEnable()
    {
        SetAiThreat();

        if (timeEvent.threat.threatAttacker == StaticDb.ThreatAttacker.intern)
        {
            SetCorruptionResistance();
            SetTrustedAi();
        }
        else
        {
            dangerResistance = StaticDb.AiDangerResistance.external;
            isTrusted        = false;
        }

        if (timeEvent.threat.threatType == StaticDb.ThreatType.remote)
        {
            StopAllCoroutines();
            boxCollider2D.enabled = false;
        }

        aiJob = CreateJob();

        if (isAttacker)
        {
            EditAttackerString();
        }
    }
Пример #2
0
 private void SetTrustedAi()
 {
     isTrusted = Random.Range(0, 100) <= manager.GetGameData().trustedEmployees * 100 / manager.GetGameData().totalEmployees;
     if (isTrusted)
     {
         dangerResistance = StaticDb.AiDangerResistance.veryHigh;
     }
 }
    //public TimeEvent timeEvent;

    public SerializableAiController(AiController ai)
    {
        this.offsetDraw        = ai.offsetDraw;
        this.scaleDraw         = ai.scaleDraw;
        this.isAttacker        = ai.isAttacker;
        this.destroy           = ai.destroy;
        this.idChecked         = ai.idChecked;
        this.idScanned         = ai.idScanned;
        this.isTrusted         = ai.isTrusted;
        this.isWaiting         = ai.isWaiting;
        this.isSuspected       = ai.isSuspected;
        this.isAiPathValuesSet = ai.isAiPathValuesSet;
        this.spriteToAnimate   = ai.spriteToAnimate;
        this.nSpriteName       = ai.nSpriteName;
        this.hlSpriteName      = ai.hlSpriteName;
        this.prSpriteName      = ai.prSpriteName;
        this.spriteNumber      = ai.spriteNumber;
        this.idSpriteName      = ai.idSpriteName;
        this.dangerResistance  = ai.dangerResistance;
        this.aiId                    = ai.aiId;
        this.aiName                  = ai.aiName;
        this.aiSurname               = ai.aiSurname;
        this.aiJob                   = ai.aiJob;
        this.aiGender                = ai.aiGender;
        this.path                    = ai.path;
        this.pathUpdated             = ai.pathUpdated;
        this.pathfinderChanged       = ai.pathfinderChanged;
        this.wrongDestinationCounter = ai.wrongDestinationCounter;
        this.radiusBase              = ai.radiusBase;
        this.onClickAi               = ai.onClickAi;
        this.aiStartCellPos          = ai.aiStartCellPos;
        this.aiCellPos               = ai.aiCellPos;
        this.aiDestCellPos           = ai.aiDestCellPos;
        this.aiSpeed                 = ai.aiSpeed;
        this.aiObjective             = ai.aiObjective;
        this.timer                   = ai.timer;
        //this.timeEvent = ai.timeEvent;
    }
Пример #4
0
 private void SetCorruptionResistance()
 {
     dangerResistance = (StaticDb.AiDangerResistance)Random.Range(0, 3);
 }