Ejemplo n.º 1
0
 public virtual void InitRepairGraphicsEffect(HealingGraphicEffectInputs tankInputs, WeaponHealingGraphicEffectInputs weaponInputs, Transform soundRoot, Transform mountPoint)
 {
     this.isLoop       = false;
     this.weaponInputs = weaponInputs;
     this.tankInputs   = tankInputs;
     this.InitSound(soundRoot);
 }
Ejemplo n.º 2
0
        private void UpdateFront(WeaponHealingGraphicEffectInputs inputs, float front, float angle)
        {
            Material[] materials = inputs.Renderer.materials;
            int        length    = materials.Length;

            for (int i = 0; i < length; i++)
            {
                Material material = materials[i];
                material.SetFloat("_RepairFrontCoeff", front);
                material.SetFloat("_RepairRotationAngle", angle);
            }
        }
Ejemplo n.º 3
0
        private void UpdateDirection(WeaponHealingGraphicEffectInputs inputs, float dir, float angle, Shader shaderWithEffect = null)
        {
            Material[] materials = inputs.Renderer.materials;
            int        length    = materials.Length;

            for (int i = 0; i < length; i++)
            {
                Material mat = materials[i];
                if (shaderWithEffect != null)
                {
                    mat.shader = shaderWithEffect;
                    this.SetRepairTextureParameters(mat, inputs);
                }
                mat.SetFloat("_RepairFrontCoeff", 0f);
                mat.SetFloat("_RepairMovementDirection", dir);
                mat.SetFloat("_RepairRotationAngle", angle);
            }
        }
Ejemplo n.º 4
0
        public override void InitRepairGraphicsEffect(HealingGraphicEffectInputs tankInputs, WeaponHealingGraphicEffectInputs weaponInputs, Transform soundRoot, Transform mountPoint)
        {
            base.InitRepairGraphicsEffect(tankInputs, weaponInputs, soundRoot, mountPoint);
            SkinnedMeshRenderer renderer  = tankInputs.Renderer;
            SkinnedMeshRenderer renderer2 = weaponInputs.Renderer;
            Bounds  localBounds           = renderer.localBounds;
            Bounds  bounds2 = renderer2.localBounds;
            Vector3 extents = renderer.localBounds.extents;
            Vector3 vector2 = renderer2.localBounds.extents;

            this.InitTankPartInputs(tankInputs, extents, localBounds.center);
            this.InitTankPartInputs(weaponInputs, vector2, bounds2.center);
        }