예제 #1
0
 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 }");
 }
예제 #2
0
파일: B.cs 프로젝트: maxim-ge/gmp-lessons
	  public void m2(IA a)
	  {
	     a.m1();

       // now we closed circle	     
	     A a2=new A();
	     a2.m1();
	  }
예제 #3
0
        public D(IA a)
        {
            if (a == null)
            {
                throw new ArgumentNullException("a");
            }

            this.a = a;
        }
예제 #4
0
	// 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>();
		}
	}
예제 #5
0
        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);
        }
예제 #6
0
 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");
   }
 }
예제 #7
0
        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();
        }
예제 #8
0
        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();
        }
예제 #9
0
 static void g(IA a)
 {
   var t = a.f();
   t.Start();
 }
예제 #10
0
 public B(IA ia)
 {
     A = ia;
 }
예제 #11
0
 public void MockedObjectsAreSingletons(IA a1, IA a2)
 {
     // Assert
       a1.Should().BeSameAs(a2);
 }
예제 #12
0
파일: TestDomain.cs 프로젝트: yln/Nukito
 public MultipleCtorsSingleInjectAttribute(IA a)
 {
 }
예제 #13
0
파일: TestDomain.cs 프로젝트: yln/Nukito
 public MultipleCtorsDifferentArgumentCount(IA a, IB b)
 {
 }
예제 #14
0
파일: Program.cs 프로젝트: ralfw/dnp2012
 public F(IA a, IS s, IT t)
 {
     s.Result += a.Process;
     a.Result += t.Process;
 }
 public B(
     IA a
     )
 {
     A = a;
 }
예제 #16
0
 public B(IA a)
 {
     this.a = a;
 }
예제 #17
0
 public void OutRefFunc(IA x, out IA y, ref IA z)
 {
     y           = new ISubA();
     y.cmpTarget = 100;
 }
예제 #18
0
 public AClassTestable3269(IA a, IB b, IC c)
 {
     A = a;
     B = b;
     C = c;
 }
예제 #19
0
 public AClassTestable960(IA a, IB b, IC c)
 {
     A = a;
     B = b;
     C = c;
 }
예제 #20
0
 public AClassTestable2001(IA a, IB b, IC c)
 {
     A = a;
     B = b;
     C = c;
 }
예제 #21
0
 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;
 }
예제 #24
0
 public C(IA a)
 {
     UsedConstructor = 2;
 }
예제 #25
0
 { public C(IA a) { } }
예제 #26
0
 public C(IA a, IB b)
 {
     UsedConstructor = 3;
 }
예제 #27
0
파일: Program.cs 프로젝트: ralfw/dnp2012
 public G(IA a, IO o, IP p)
 {
     o.Result += a.Process;
     a.Result += p.Process;
 }
예제 #28
0
 public C(IA a, IB b, IC c)
 {
     UsedConstructor = 4;
 }
예제 #29
0
파일: TestDomain.cs 프로젝트: yln/Nukito
 public MultipleCtorsSameArgumentCount(IA a)
 {
 }
예제 #30
0
파일: IA.cs 프로젝트: Cataklyste/Ethno
	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;
		}
	}
예제 #31
0
파일: TestDomain.cs 프로젝트: yln/Nukito
 public SingleCtor(IA a)
 {
 }
예제 #32
0
 public B(IA a, S s)
 {
     this.a = a;
     this.s = s;
 }
예제 #33
0
 public void MockedObjectsInDifferentContextAreSingletonsToo(IA a, DepOnInterface depOnInterface)
 {
     // Assert
       a.Should().BeSameAs(depOnInterface.A);
 }
예제 #34
0
 public C(IA a, IB b)
 {
     this.a = a;
     this.b = b;
 }
예제 #35
0
 public DecoratorA(IA parent)
 {
     this.parent = parent;
 }
예제 #36
0
 public BC(IA a)
 {
 }
예제 #37
0
 static async void h(IA a)
 {
   await a.f2();
 }
예제 #38
0
 public D(IA a, IC c)
 {
 }
예제 #39
0
파일: IA.cs 프로젝트: Cataklyste/Ethno
	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;
	}
예제 #40
0
 public abstract void Do(IA a);
예제 #41
0
    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;
    }
예제 #42
0
 public Enemy(DiscreteDynamicsWorld world, TGCVector3 position, float orientation, GameModel gameModel) : base(world, Vehiculo.GetRandom(), position, orientation, gameModel)
 {
     ia = new IA();
 }