initial commit

This commit is contained in:
2026-05-29 18:21:53 +03:00
commit 66ddf0ead0
2184 changed files with 1384338 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class RainDirector : MonoBehaviour
{
public Vector3 planetCenter;
void Start()
{
ParticleSystem[] systems = GetComponentsInChildren<ParticleSystem>();
foreach (ParticleSystem ps in systems)
{
Vector3 dirToCenter = (planetCenter - transform.position).normalized;
var velocityOverLifetime = ps.velocityOverLifetime;
velocityOverLifetime.enabled = true;
velocityOverLifetime.space = ParticleSystemSimulationSpace.World;
velocityOverLifetime.x = dirToCenter.x * 20f;
velocityOverLifetime.y = dirToCenter.y * 20f;
velocityOverLifetime.z = dirToCenter.z * 20f;
var main = ps.main;
main.gravityModifier = 0f;
}
}
}