Exemplo n.º 1
0
 private void Start()
 {
     this.resetSkinDamage();
     this.animator  = base.transform.root.GetComponentInChildren <Animator>();
     this.ai        = base.transform.root.GetComponentInChildren <mutantAI_net>();
     this.netHealth = base.transform.root.GetComponentInChildren <mutantNetHealthSync>();
 }
Exemplo n.º 2
0
 private void doStart()
 {
     this.feetAudio     = base.transform.FindChild("feetAudioGo").gameObject;
     this.waterDetect   = base.transform.parent.GetComponent <mutantWaterDetect>();
     this.animator      = base.gameObject.GetComponent <Animator>();
     this.setup         = base.GetComponent <mutantScriptSetup>();
     this.ai            = base.GetComponent <mutantAI>();
     this.ai_net        = base.GetComponent <mutantAI_net>();
     this.followers     = base.transform.root.GetComponent <mutantFollowerFunctions>();
     this.oneshotEvents = new List <FMODCommon.OneshotEventInfo>();
     this.loopingEvents = new List <FMODCommon.LoopingEventInfo>();
     base.InvokeRepeating("cleanupOneshotEvents", 1f, 1f);
     this.idleTimeoutEnd = 0f;
     this.idleStateHash  = Animator.StringToHash("Base Layer.idle01");
     this.inIdleState    = false;
     if (this.Remote)
     {
         return;
     }
     if (!this.eventPosition)
     {
         this.eventPosition = base.gameObject;
     }
     if (this.parryChecker)
     {
         this.parryChecker.SetActive(false);
     }
     this.actor = UnityEngine.Random.Range(0, 2);
     this.mainWeaponCollider = this.setup.mainWeapon.GetComponent <BoxCollider>();
     this.defaultWeaponRange = this.mainWeaponCollider.size.z;
     this.defaultWeaponPos   = this.mainWeaponCollider.center.z;
 }
Exemplo n.º 3
0
 private void doAwake()
 {
     this.enemyHitMask = 36841472;
     this.rootTr       = base.transform.root;
     if (!this.netPrefab)
     {
         this.setup = base.transform.root.GetComponentInChildren <mutantScriptSetup>();
         this.ai    = base.transform.root.GetComponentInChildren <mutantAI>();
     }
     if (this.netPrefab)
     {
         this.ai_net = base.transform.root.GetComponentInChildren <mutantAI_net>();
     }
     this.animator  = base.transform.root.GetComponentInChildren <Animator>();
     this.events    = base.transform.root.GetComponentInChildren <enemyAnimEvents>();
     this.blockHash = Animator.StringToHash("block");
     FMODCommon.PreloadEvents(new string[]
     {
         this.weaponHitEvent,
         this.parryEvent,
         this.blockEvent,
         this.shellBlockEvent
     });
     this.hasPreloaded = true;
 }
Exemplo n.º 4
0
 private void doAwake()
 {
     this.enemyHitMask = 36841472;
     this.rootTr = base.transform.root;
     if (!this.netPrefab)
     {
         this.setup = base.transform.root.GetComponentInChildren<mutantScriptSetup>();
         this.ai = base.transform.root.GetComponentInChildren<mutantAI>();
     }
     if (this.netPrefab)
     {
         this.ai_net = base.transform.root.GetComponentInChildren<mutantAI_net>();
     }
     this.animator = base.transform.root.GetComponentInChildren<Animator>();
     this.events = base.transform.root.GetComponentInChildren<enemyAnimEvents>();
     this.blockHash = Animator.StringToHash("block");
     FMODCommon.PreloadEvents(new string[]
     {
         this.weaponHitEvent,
         this.parryEvent,
         this.blockEvent,
         this.shellBlockEvent
     });
     this.hasPreloaded = true;
 }
Exemplo n.º 5
0
    private void Awake()
    {
        mutantAI_net component = base.transform.GetComponent <mutantAI_net>();

        if (component && component.creepy_boss)
        {
            base.enabled = false;
            return;
        }
        if (base.entity && base.entity.isAttached)
        {
            CoopAnimal componentInChildren = base.transform.GetComponentInChildren <CoopAnimal>();
            if (componentInChildren && componentInChildren.birdType)
            {
                UnityEngine.Object.Destroy(this);
            }
            foreach (Renderer item in base.entity.GetComponentsInChildren <Renderer>())
            {
                this.Renderers.Add(item);
            }
            foreach (Collider item2 in base.entity.GetComponentsInChildren <Collider>())
            {
                this.Colliders.Add(item2);
            }
            if (!this.animator)
            {
                this.animator = base.entity.GetComponentInChildren <Animator>();
            }
            if (base.entity.isFrozen)
            {
                this.DisableComponents();
            }
            else
            {
                this.EnableComponents();
            }
        }
    }
Exemplo n.º 6
0
 private void Start()
 {
     this.aiNet = base.transform.GetComponent <mutantAI_net>();
     base.Invoke("cleanUpDirty", 2f);
 }
 private void Start()
 {
     this.aiNet = base.transform.GetComponent<mutantAI_net>();
     base.Invoke("cleanUpDirty", 2f);
 }
Exemplo n.º 8
0
    private IEnumerator SetTypeRoutine()
    {
        yield return(null);

        mutantTypeSetup typeSetup = base.GetComponent <mutantTypeSetup>();

        if (typeSetup)
        {
            mutantAI ai2 = typeSetup.setup.ai;
            if (ai2.skinned)
            {
                this.Type = EnemyType.skinMaskMale;
            }
            else if (ai2.maleSkinny)
            {
                this.Type = ((!ai2.pale) ? EnemyType.skinnyMale : EnemyType.skinnyMalePale);
            }
            else if (ai2.femaleSkinny)
            {
                this.Type = ((!ai2.pale) ? EnemyType.skinnyFemale : EnemyType.skinnyFemalePale);
            }
            else if (ai2.male)
            {
                this.Type = ((!ai2.pale) ? EnemyType.regularMale : EnemyType.paleMale);
            }
            else if (ai2.female)
            {
                this.Type = ((!ai2.pale) ? EnemyType.regularFemale : EnemyType.paleFemale);
            }
            else if (ai2.creepy_male)
            {
                this.Type = ((!ai2.pale) ? EnemyType.creepyArmsy : EnemyType.creepyArmsy);
            }
            else if (ai2.creepy_fat)
            {
                this.Type = EnemyType.creepyFat;
            }
            else if (ai2.creepy_baby)
            {
                this.Type = EnemyType.creepyBaby;
            }
            else if (ai2.creepy)
            {
                this.Type = ((!ai2.pale) ? EnemyType.creepySpiderLady : EnemyType.blueCreepySpiderLady);
            }
        }
        else
        {
            BoltEntity   entity = base.GetComponent <BoltEntity>();
            mutantAI_net ai     = base.GetComponentInChildren <mutantAI_net>();
            IMutantState state  = entity.GetState <IMutantState>();
            while (!entity.isAttached || state.ai_mask == 0)
            {
                yield return(null);
            }
            if (ai)
            {
                if (ai.skinned)
                {
                    this.Type = EnemyType.skinMaskMale;
                }
                else if (ai.maleSkinny)
                {
                    this.Type = ((!ai.pale) ? EnemyType.skinnyMale : EnemyType.skinnyMalePale);
                }
                else if (ai.femaleSkinny)
                {
                    this.Type = ((!ai.pale) ? EnemyType.skinnyFemale : EnemyType.skinnyFemalePale);
                }
                else if (ai.male)
                {
                    this.Type = ((!ai.pale) ? EnemyType.regularMale : EnemyType.paleMale);
                }
                else if (ai.female)
                {
                    this.Type = ((!ai.pale) ? EnemyType.regularFemale : EnemyType.paleFemale);
                }
                else if (ai.creepy_male)
                {
                    this.Type = ((!ai.pale) ? EnemyType.creepyArmsy : EnemyType.creepyArmsy);
                }
                else if (ai.creepy_fat)
                {
                    this.Type = EnemyType.creepyFat;
                }
                else if (ai.creepy_baby)
                {
                    this.Type = EnemyType.creepyBaby;
                }
                else if (ai.creepy)
                {
                    this.Type = ((!ai.pale) ? EnemyType.creepySpiderLady : EnemyType.blueCreepySpiderLady);
                }
            }
        }
        yield break;
    }
Exemplo n.º 9
0
 private void Start()
 {
     this.resetSkinDamage();
     this.animator = base.transform.root.GetComponentInChildren<Animator>();
     this.ai = base.transform.root.GetComponentInChildren<mutantAI_net>();
     this.netHealth = base.transform.root.GetComponentInChildren<mutantNetHealthSync>();
 }