WeatherSystem | open source and free-to-use weather system package | Bot library
kandi X-RAY | WeatherSystem Summary
kandi X-RAY | WeatherSystem Summary
An open source and free-to-use weather system package for Unity produced as an undergraduate dissertation piece.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of WeatherSystem
WeatherSystem Key Features
WeatherSystem Examples and Code Snippets
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modi
Community Discussions
Trending Discussions on WeatherSystem
QUESTION
I have a base class called BaseWeather
and every weather state derives from this base class
Now BaseWeather
contains public ParticleSystem _ParticleSystem;
Because most of the weather states can have 1 or more particle systems(Thunderstorm->Rain->Lighting->Tornado)
Now when it comes to the Sunny state of weather there are no particle systems because the "Sunnyness" is handled by light and fog so in my derived class Sunny
I did this to try to remedy the fact that there is gonna be a null particle system
ANSWER
Answered 2018-Feb-09 at 12:46The "right" way would be one of:
- Create another base class, e.g.
BaseWeatherWithParticleSystem
and only inherit from that if you do in fact supply a particle system - Create an interface, e.g.
IWeatherParticleSystem
and implement that for the classes that need a particle system.
I'd lean to the interface approach. It makes testing easier and more clearly advertises the capabilities of the class. Mind you, you could implement both approaches, e.g.:
QUESTION
I am working in a c# environment and am creating a base class and would like to have other classes like StormyWeather.cs
or SunnyWeather.cs
and have these classes derive from the base class BaseWeather.cs
ANSWER
Answered 2018-Jan-31 at 12:18If I understood the question, you can identify the inheritance using:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install WeatherSystem
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page