static async void j(IA a) { WriteLine($"[{Environment.CurrentManagedThreadId}] j-0"); Task<string> result = _j(a); WriteLine($"[{Environment.CurrentManagedThreadId}] j-1"); WriteLine($"[{Environment.CurrentManagedThreadId}] j-2: { await result }"); }
public void m2(IA a) { a.m1(); // now we closed circle A a2=new A(); a2.m1(); }
public D(IA a) { if (a == null) { throw new ArgumentNullException("a"); } this.a = a; }
// Use this for initialization void Start () { if (hero) _player = transform.parent.GetComponent<Player> (); else { _monster = transform.GetComponent<IA> (); if (_monster == null) _monster = transform.parent.GetComponent<IA>(); } }
private void TestsShouldBeIndependent(IA iface, A clazz, Mock<IA> mock) { // Assert s_interfaces.Should().NotContain(iface); s_classes.Should().NotContain(clazz); s_mocks.Should().NotContain(mock); // Add objects in static collection for next test s_interfaces.Add(iface); s_classes.Add(clazz); s_mocks.Add(mock); }
static async Task<string> _j(IA a) { try { WriteLine($"[{Environment.CurrentManagedThreadId}] _j-0"); Task<string> task = a.GetString(); WriteLine($"[{Environment.CurrentManagedThreadId}] _j-1"); string result = await task; WriteLine($"[{Environment.CurrentManagedThreadId}] _j-2"); return result; } finally { WriteLine($"[{Environment.CurrentManagedThreadId}] _j-3"); } }
public Manager(Game game) : base(game) { computer = new IA(this); Random generation = new System.Random(); TouchPanel.EnabledGestures = GestureType.FreeDrag | GestureType.DragComplete; List<Vector2> coordFactory = new List<Vector2>(); int numFactory = generation.Next(8, 15); int widthFactory = Game.GraphicsDevice.Viewport.Width / 7; int heightFactory = Game.GraphicsDevice.Viewport.Height / 3; for (int i = 0; i < 7; i++) { for (int j = 0; j < 3; j++) coordFactory.Add(new Vector2(widthFactory * i, heightFactory * j)); } for (int i = 0; i < numFactory; i++) { int posFactory = generation.Next(0, coordFactory.Count); if (i == 0) { factories.Add(new Factory(game, 1, coordFactory[posFactory], capitalFactoryCap)); } else if (i == numFactory - 1) { factories.Add(new Factory(game, 2, coordFactory[posFactory], capitalFactoryCap)); } else { factories.Add(new Factory(game, 0, coordFactory[posFactory], generation.Next(neutralFactoryMinCap, neutralFactoryMaxCap))); } coordFactory.Remove(coordFactory[posFactory]); } computer.loadNeutralFactories(); }
public override void Init() { camera = new Libraries.Camera(TurkeySmashGame.manager); #region player1 model = new Joueur(PlayerIndex.One, MathHelper.ToRadians(-90), MathHelper.ToRadians(180)); model.Load("Models\\dude", TurkeySmashGame.content); walk = new AnimatedModel(); walk.Load("Models\\dude-walk", TurkeySmashGame.content); AnimationClip clip = walk.Clips[0]; AnimationPlayer player = model.PlayClip(clip); player.Looping = true; model.Size = new Vector2(50, 350); elements[0] = model; #endregion #region IA1 dude2 = new IA(PlayerIndex.Two, MathHelper.ToRadians(-90), MathHelper.ToRadians(180)); dude2.Load("Models\\dude", TurkeySmashGame.content); walk = new AnimatedModel(); walk.Load("Models\\dude-walk", TurkeySmashGame.content); AnimationClip clip2 = walk.Clips[0]; AnimationPlayer player2 = dude2.PlayClip(clip2); player2.Looping = true; dude2.Size = new Vector2(50, 350); elements[1] = dude2; #endregion if (SelectionNiveau.niveauSelect == "spacefarm") level = new Level("Jeu\\space", "Models\\farm", elements, TurkeySmashGame.content); else level = new Level("Jeu\\citybackground", "Models\\MapCity2", elements, TurkeySmashGame.content); hud.Load(elements); camera.Initialize(); sonInstance.Volume = 0.5f; sonInstance.IsLooped = true; sonInstance.Resume(); }
static void g(IA a) { var t = a.f(); t.Start(); }
public B(IA ia) { A = ia; }
public void MockedObjectsAreSingletons(IA a1, IA a2) { // Assert a1.Should().BeSameAs(a2); }
public MultipleCtorsSingleInjectAttribute(IA a) { }
public MultipleCtorsDifferentArgumentCount(IA a, IB b) { }
public F(IA a, IS s, IT t) { s.Result += a.Process; a.Result += t.Process; }
public B( IA a ) { A = a; }
public B(IA a) { this.a = a; }
public void OutRefFunc(IA x, out IA y, ref IA z) { y = new ISubA(); y.cmpTarget = 100; }
public AClassTestable3269(IA a, IB b, IC c) { A = a; B = b; C = c; }
public AClassTestable960(IA a, IB b, IC c) { A = a; B = b; C = c; }
public AClassTestable2001(IA a, IB b, IC c) { A = a; B = b; C = c; }
static async void i(IA a) { WriteLine($"[{Environment.CurrentManagedThreadId}] i-begin"); int r = await a.f3(); WriteLine($"[{Environment.CurrentManagedThreadId}] i-result: {r}"); }
public X(IA a1, IA a2) { this.a1 = a1; this.a2 = a2; }
public AClassTestable1516(IA a, IB b, IC c) { A = a; B = b; C = c; }
public C(IA a) { UsedConstructor = 2; }
{ public C(IA a) { } }
public C(IA a, IB b) { UsedConstructor = 3; }
public G(IA a, IO o, IP p) { o.Result += a.Process; a.Result += p.Process; }
public C(IA a, IB b, IC c) { UsedConstructor = 4; }
public MultipleCtorsSameArgumentCount(IA a) { }
void DoAction(IA targetIA) { if (status != Status.NONE || targetIA.status != Status.NONE) return; float randParler = Random.Range(0.0f, 100.0f); if (randParler <= ChanceDeParler) { StopMove(); targetIA.StopMove(); _targetTalke = targetIA; targetIA._targetTalke = this; int random = Random.Range(0, 1); if (random == 0) { status = Status.TALK; targetIA.status = Status.LISEN; } else { status = Status.LISEN; targetIA.status = Status.TALK; } haveIA = true; } }
public SingleCtor(IA a) { }
public B(IA a, S s) { this.a = a; this.s = s; }
public void MockedObjectsInDifferentContextAreSingletonsToo(IA a, DepOnInterface depOnInterface) { // Assert a.Should().BeSameAs(depOnInterface.A); }
public C(IA a, IB b) { this.a = a; this.b = b; }
public DecoratorA(IA parent) { this.parent = parent; }
public BC(IA a) { }
static async void h(IA a) { await a.f2(); }
public D(IA a, IC c) { }
public void ResetIA() { if (haveIA) { haveIA = false; if (_targetTalke) _targetTalke.ResetIA(); } word.gameObject.SetActive(false); _index = 0; status = Status.NONE; questionPosser = false; _deltaQuestion = 0f; _deltaAnswer = 0f; _GetQuestion = false; _targetTalke = null; }
public abstract void Do(IA a);
void Start() { Instance = this; _board = new GameObject[15][]; Board = new int[15][]; for (int i = 0; i< 15;i++ ) { _board[i] = new GameObject[15]; Board[i] = new int[15]; } for (int i = 0; i < 15; i++) { for (int j = 0; j < 15; j++) { Board[i][j] = 0; _board[i][j] = (GameObject)GameObject.Instantiate(Tile, new Vector3( (i * 0.4f)-2.8f, (j * 0.4f)-2.8f, 0), Quaternion.identity); _board[i][j].GetComponent<Tile>().i = i; _board[i][j].GetComponent<Tile>().j= j; } } _ia = GetComponent<IA>(); PlayerTurn = true; }
public Enemy(DiscreteDynamicsWorld world, TGCVector3 position, float orientation, GameModel gameModel) : base(world, Vehiculo.GetRandom(), position, orientation, gameModel) { ia = new IA(); }