コード例 #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;
 }
コード例 #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>();
 }
コード例 #3
0
ファイル: MySceneBehavior.cs プロジェクト: 123asd123A/Samples
        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>();
        }