コード例 #1
0
ファイル: Actor.cs プロジェクト: vetcat/ProjectCodeSamples
    private void Awake()
    {
        var contextHolder = GetComponentInChildren <ContextHolder>();

        if (contextHolder)
        {
            contextHolder.Context = new ActorUIContext();
            _contextUI            = (ActorUIContext)contextHolder.Context;
        }
        else
        {
            Debug.LogError("[Actor] contextHolder not found");
        }
    }
コード例 #2
0
ファイル: EditorController.cs プロジェクト: bryanedds/Xi
 private void SetUpContexts()
 {
     AddContext(actor3DContext = new Actor3DContext(game, this));
     AddContext(actor2DContext = new Actor2DContext(game, this));
     AddContext(actorUIContext = new ActorUIContext(game, this));
     AddContext(facetContext = new FacetContext(game, this));
     AddContext(new CameraContext(game, this));
     game.SimulationSelectionChanged += game_SimulationSelectionChanged;
 }
コード例 #3
0
 private void SetUpContexts()
 {
     AddContext(actor3DContext = new Actor3DContext(game, this));
     AddContext(actor2DContext = new Actor2DContext(game, this));
     AddContext(actorUIContext = new ActorUIContext(game, this));
     AddContext(facetContext = new FacetContext(game, this));
     AddContext(new CameraContext(game, this));
 }