CloudLayer CreateCloudLayer(string name, int layerIndex) { CloudLayer cl = Utils.CreateGameObject(null, name, CloudGroup).AddComponent <CloudLayer>(); cl.Executor = this; cl.LayerIndex = layerIndex; return(cl); }
void CreateCloud() { CloudGroup = Utils.CreateGameObject(null, "Cloud Layers", WeatherGroup).transform; SunCloudLayer = CreateCloudLayer("Sun Cloud", 0); RainCloudLayer = CreateCloudLayer("Rain Cloud", -10); }