protected override void ApplyHitEffects(Alien alien) { SlowEffect efx = alien.gameObject.GetComponent <SlowEffect>(); if (efx != null) { Object.Destroy(efx); } if (GameSession.Instance.isNetworkGame) { alien.slowDown(SlowTime, SlowRate); } SlowEffect fx = alien.gameObject.AddComponent <SlowEffect>(); fx.Init(SlowTime, SlowRate); }
void RPCSlow(float SlowTime, float SlowRate) { SlowEffect fx = gameObject.AddComponent <SlowEffect>(); fx.Init(SlowTime, SlowRate); }