Esempio n. 1
0
 public Layer()
 {
     Receive <FetchParameters>(parameters =>
     {
         ParameterShardId.Tell(new ParameterRequest());
         Become(WaitForParameters);
     });
     Receive <MyChild>(child =>
     {
         ChildLayer = child.Child;
     });
     Receive <ForwardPass>(pass =>
     {
         if (ChildLayer != null)
         {
             ChildLayer.Tell(pass);
         }
         else
         {
             //deltas, gradient and initialize backward pass
         }
     });
     Receive <BackwardPass>(pass =>
     {
     });
 }
    void Start()
    {
        //アクティブでないシーンはカメラを着る
        MainCam.SetActive(false);
        scene         = GameObject.Find("SceneController");
        sceneControll = scene.GetComponent <SceneControll>();

        //現在のステージと自身が存在するシーンが異なればレイヤー設定
        if (GetSceneContainObject(gameObject) != sceneControll.CurrentStage.ToString() + "ChildScene" ||
            sceneControll.CurrentScene == SceneName.SelectScene)
        {
            List <GameObject> list = ChildLayer.GetAll(stageObj);
            foreach (var childTransform in list)
            {
                childTransform.gameObject.layer = LayerMask.NameToLayer("Production");
            }
        }
        if (SceneManager.GetActiveScene().name == SceneName.SelectScene.ToString())
        {
            foreach (var light_ in light)
            {
                light_.SetActive(false);
            }
        }
    }