Esempio 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;
 }
Esempio 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>();
 }
Esempio 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>();
        }