Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     this.animator    = base.transform.GetComponentInChildren <Animator>();
     this.getParams   = base.GetComponent <getAnimatorParams>();
     this.setup       = base.transform.GetComponentInChildren <mutantScriptSetup>();
     this.ai          = base.transform.GetComponentInChildren <mutantAI>();
     this.props       = base.transform.GetComponentInChildren <mutantPropManager>();
     this.propsFemale = base.transform.GetComponentInChildren <setupBodyVariation>();
     this.health      = base.transform.GetComponentInChildren <EnemyHealth>();
     this.followSetup = base.transform.GetComponent <mutantFollowerFunctions>();
     this.dayCycle    = base.transform.GetComponentInChildren <mutantDayCycle>();
     this.controlGo   = Scene.MutantControler.gameObject;
     if (this.controlGo)
     {
         this.mutantControl = Scene.MutantControler;
     }
     this.spawnManager = this.controlGo.GetComponent <mutantSpawnManager>();
     this.stats        = base.transform.GetComponent <targetStats>();
     this.waterLayer   = LayerMask.NameToLayer("Water");
 }