|
|
@@ -7,9 +7,8 @@ var component = function(self) {
|
|
|
|
|
|
self.start = function() {
|
|
|
if(!dayTime) {
|
|
|
- //if it's night, make TheSun color darker
|
|
|
+ //if it's night, make TheSun color darker - ambient isn't being set properly, see GitHub issue: https://github.com/AtomicGameEngine/AtomicGameEngine/issues/340
|
|
|
self.scene.getComponent("Zone").ambientColor = [0, 0, 0, 0.2];
|
|
|
- console.log("----------------->", self.scene.getComponent("Zone").ambientColor);// = [0, 0, 0, 0];
|
|
|
var sun = self.node.getChild("TheSun").getComponent("DirectionalLight2D");
|
|
|
sun.enabled = false;
|
|
|
}
|