void EnableWeather(WeatherComponent node, bool enabled) { if (enabled) { node.EnableWeatherSystem(this); } else { node.DisableWeatherSystem(this); } }
public void Tick(float deltaTime) { if (AnimationType == AnimationType.Animated) { if (PositionOffset.X > 64) { PositionOffset -= new Vector2f(64, 64); } PositionOffset += new Vector2f(Intensity * deltaTime * 64, Intensity * deltaTime * 64); WeatherComponent?.SetPosition(Position + PositionOffset); } }
public void SetUp() { _component = (WeatherComponent)Engine.Game.UiManager.GetComponent <WeatherComponent>(); }
public void RemoveInfluenceObject(WeatherComponent obj) { _influenceObjects.Remove(obj); EnableWeather(obj, false); }
public void AddInfluenceObject(WeatherComponent obj) { _influenceObjects.Add(obj); EnableWeather(obj, true); }
public WeatherView(WeatherComponent component = null) : base(component) { InitializeComponent(); Load(); Component.PropertyChanged += Component_PropertyChanged; }