Example #1
0
        public override void Bind(Entity entity, Main main, bool creating = false)
        {
            entity.CannotSuspendByDistance = true;
            Transform        transform        = entity.GetOrCreate <Transform>("Transform");
            DirectionalLight directionalLight = entity.GetOrCreate <DirectionalLight>("DirectionalLight");

            directionalLight.Add(new Binding <Quaternion>(directionalLight.Quaternion, transform.Quaternion));

            this.SetMain(entity, main);

            entity.Add("Enable", directionalLight.Enable);
            entity.Add("Disable", directionalLight.Disable);
            entity.Add("Enabled", directionalLight.Enabled);
            entity.Add("Color", directionalLight.Color);
            entity.Add("Shadowed", directionalLight.Shadowed);
            entity.Add("Clouds", directionalLight.CloudShadow);
            entity.Add("CloudVelocity", directionalLight.CloudVelocity);
        }