Ejemplo n.º 1
0
 public PlayerAIBehavior(Entity ball)
     : base("PlayerIABehavior")
 {
     this.trans2D = null;
     this.ball = ball;
     this.transBall2D = ball.FindComponent<Transform2D>();
     this.ballBehavior = ball.FindComponent<BallBehavior>();
     this.direction = ballBehavior.HorizontalDirection;
 }
Ejemplo n.º 2
0
 protected override void ResolveDependencies()
 {
     ball         = (this.Scene as GameScene).EntityManager.Find <Entity>("Ball");
     bg           = (this.Scene as GameScene).EntityManager.Find <Entity>("Background");
     ballBehavior = ball.FindComponent <BallBehavior>();
 }
Ejemplo n.º 3
0
        protected override void ResolveDependencies()
        {

            ball = (this.Scene as GameScene).EntityManager.Find<Entity>("Ball");
            bg = (this.Scene as GameScene).EntityManager.Find<Entity>("Background");
            ballBehavior = ball.FindComponent<BallBehavior>();
        }