Inheritance: MonoBehaviour
Exemplo n.º 1
0
 	static void Main() {
 	Deadlock dead1 = new Deadlock();
 	Deadlock dead2 = new Deadlock();
 	dead1.Other = dead2;
 	dead2.Other = dead1;
 	new Thread (dead1.Demo).Start();
 	dead2.Demo();
 }
Exemplo n.º 2
0
 internal DeadlockThread(Deadlock _enclosing, string name, Lock lock1, Lock lock2)
     : base(name)
 {
     this._enclosing = _enclosing;
     this.lock1      = lock1;
     this.lock2      = lock2;
     this.useSync    = true;
 }
Exemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        gameBoard = FindObjectOfType <GameBoard>();
        deadlock  = FindObjectOfType <Deadlock>();

        // Set delay
        hintDelay = s_hintDelayMax;
    }
Exemplo n.º 4
0
 internal DeadlockThread(Deadlock _enclosing, string name, TestTimedOutTestsListener.Deadlock.Monitor
                         mon1, TestTimedOutTestsListener.Deadlock.Monitor mon2)
     : base(name)
 {
     this._enclosing = _enclosing;
     this.mon1       = mon1;
     this.mon2       = mon2;
     this.useSync    = false;
 }
Exemplo n.º 5
0
    // Start is called before the first frame update
    void Start()
    {
        //Start game active
        currentPlayerState = PlayerState.Active;

        // If no tile count is set, use maximum ammount
        if (NumOfTileTypes == 0 || NumOfTileTypes > Utilities.NumOfGameTileTypes())
        {
            NumOfTileTypes = Utilities.NumOfGameTileTypes();
        }

        // If the artist hasn't set a board, render default
        if (!s_GridTile)
        {
            // Loads the tile from the resources folder
            s_GridTile = Resources.Load <GameObject>(string.Format("{0}/{1}{2}", Utilities.Prefabs, Utilities.PF, Utilities.GridTile));
        }

        // If the artist hasn't set a board, render default
        if (!s_GameTile)
        {
            s_GameTile = Resources.Load <GameObject>(
                string.Format("{0}/{1}{2}", Utilities.Prefabs, Utilities.PF, Utilities.BaseGameTile)
                );
        }

        // Null point check
        if (s_GridTile)
        {
            DrawBoard();
        }

        // Sets game managers
        matchesManager = FindObjectOfType <MatchesManager>();
        deadlock       = FindObjectOfType <Deadlock>();

        Utilities.ColumnOffset = gameObject.transform.position.x;
        Utilities.RowOffset    = gameObject.transform.position.y;
    }
Exemplo n.º 6
0
 internal Monitor(Deadlock _enclosing, string name)
 {
     this._enclosing = _enclosing;
     this.name       = name;
 }