コード例 #1
0
ファイル: UfoAiComponent.cs プロジェクト: cyberimp/Asteroids
 public override bool Update(Entity entity, float delta)
 {
     if (_target == null)
     {
         _target = _parent.FindByTag(Tags.Player);
     }
     entity.Velocity = _target.Position - entity.Position;
     entity.Velocity.NormalizeFast();
     entity.Velocity *= UfoVelocity;
     return(true);
 }