コード例 #1
0
ファイル: Contexts.cs プロジェクト: kwh3884858/BladeSlayer
    public Contexts()
    {
        enemy  = new EnemyContext();
        game   = new GameContext();
        input  = new InputContext();
        player = new PlayerContext();

        var postConstructors = System.Linq.Enumerable.Where(
            GetType().GetMethods(),
            method => System.Attribute.IsDefined(method, typeof(Entitas.CodeGeneration.Attributes.PostConstructorAttribute))
            );

        foreach (var postConstructor in postConstructors)
        {
            postConstructor.Invoke(this, null);
        }
    }
コード例 #2
0
 public EnemyController(EnemyContext context)
 {
     this.context = context;
     //this.enemyCreator = new EnemyCreatorAdapter(new EnemyPartyDirector(new GrassEnvironmentFactory()));
     //createEnemies();
 }
コード例 #3
0
 private void Construct(DiContainer container, SignalBus signalBus, EnemyContext enemyContext)
 {
     _container    = container;
     _signalBus    = signalBus;
     _enemyContext = enemyContext;
 }
コード例 #4
0
 public EnemyHear(EnemyContext enemyContext) : base(enemyContext)
 {
 }