public void AlphaBlendByDistance(TimeUpdateEvent e, MineNode mine, [JoinByTank] EnemyTankNode tank, [JoinByBattle] SelfTankNode selfTank)
 {
     if (!mine.Entity.HasComponent <MineActivationGraphicsComponent>())
     {
         Vector4 vector = MINE_ACTIVATION_COLOR;
         vector.w = MineCommonGraphicsSystem.BlendMine(mine.mineConfig, mine.effectInstance, mine.effectRendererGraphics, selfTank.hullInstance);
         mine.effectRendererGraphics.Renderer.material.SetColor("_Color", vector);
     }
 }
Beispiel #2
0
        public void ActivateMineTrigger(NodeAddedEvent e, ActiveMineNode mine, [JoinByTank, Context] EnemyTankNode tank)
        {
            Rigidbody    componentInChildren = mine.effectInstance.GameObject.GetComponentInChildren <Rigidbody>();
            MeshCollider collider            = componentInChildren.GetComponentInChildren <MeshCollider>();
            float        num        = 1f;
            Vector3      localScale = collider.transform.localScale;
            float        x          = (localScale.x * ((mine.mineEffectTriggeringArea.Radius + 0.5f) * 2f)) / num;

            collider.transform.localScale = new Vector3(x, localScale.y, x);
            componentInChildren.gameObject.AddComponent <MinePhysicsTriggerBehaviour>().TriggerEntity = mine.Entity;
        }
Beispiel #3
0
 public void AlfaBlendByDistance(TimeUpdateEvent e, MineBlendNode mine, [JoinByTank] EnemyTankNode isEnemy, [JoinByBattle] SelfTankNode selfTank)
 {
     mine.effectRendererGraphics.Renderer.material.SetFloat(TankMaterialPropertyNames.ALPHA, MineCommonGraphicsSystem.BlendMine(mine.mineConfig, mine.effectInstance, mine.effectRendererGraphics, selfTank.hullInstance));
 }