Beispiel #1
0
        public virtual void SetVisual(EntityAI ai)
        {
            MeshFilter   filter   = ai.my.killingHandler.my.Poser.meshFilter;
            MeshRenderer render   = filter.GetComponent <MeshRenderer>();
            Transform    vis      = filter.transform;
            Transform    visPivot = vis.parent;

            ai.health = Chicken.AI.health;

            filter.mesh           = Chicken.mesh;
            render.sharedMaterial = Chicken.mat;
            if (visPivot.parent != ai.transform)
            {
                visPivot.parent.localScale = Vector3.one;
            }
            VidyaMod.MatchTransform(visPivot, Chicken.visPivot);
            VidyaMod.MatchTransform(vis, Chicken.vis);

            Transform remove = visPivot.FindChild("ArmCollider");

            if (remove)
            {
                remove.gameObject.SetActive(false);
            }
            remove = visPivot.FindChild("AttackCollider");
            if (remove)
            {
                remove.gameObject.SetActive(false);
            }
        }
Beispiel #2
0
        public virtual void ChangeFireControl(EntityAI ai)
        {
            FireController fireControl = ai.my.killingHandler.my.fireControl;

            VidyaMod.MatchTransform(fireControl.transform, Chicken.fireControl.transform);
            SphereCollider fireCollider        = fireControl.myCollider as SphereCollider;
            FireController chickenFireControl  = Chicken.fireControl;
            SphereCollider chickenFireCollider = chickenFireControl.myCollider as SphereCollider;

            fireCollider.center          = chickenFireCollider.center;
            fireCollider.radius          = chickenFireCollider.radius;
            fireControl.destroyTimer     = chickenFireControl.destroyTimer;
            fireControl.randomAmount     = chickenFireControl.randomAmount;
            fireControl.onFireDuration   = chickenFireControl.onFireDuration;
            fireControl.fullFireDuration = fireControl.destroyTimer + fireControl.onFireDuration;
        }