Esempio n. 1
0
 public PlayerController(PlayerAffiliation affiliation)
 {
     Player = new Player(affiliation);
 }
Esempio n. 2
0
 public Player(Board board, PlayerAffiliation affiliation)
 {
     m_board     = board;
     Affiliation = affiliation;
 }
Esempio n. 3
0
    void OnTriggerEnter(Collider other)
    {
        modalPanel     = ModalPanel.Instance();
        displayManager = DisplayManager.Instance();


        if (other.tag == "Player")
        {
            //Destroy(other.gameObject);

            PlayerAffiliation playerAffiliation = other.GetComponent <PlayerAffiliation> ();
            PlayerHealth      playerHealth      = other.GetComponent <PlayerHealth> ();
            EnemyAffiliation  enemyAffiliation  = GetComponent <EnemyAffiliation> ();

            if (playerAffiliation != null)
            {
                playerAff1 = playerAffiliation.affiliation1;
                playerAff2 = playerAffiliation.affiliation2;
                queCount   = playerAffiliation.queCounter;
            }
            if (enemyAffiliation != null)
            {
                aff1 = enemyAffiliation.affiliation1;
                aff2 = enemyAffiliation.affiliation2;
            }

            if (playerHealth != null)
            {
                truth = playerHealth.truth;
            }
            if (truth > 0)
            {
                if (aff1 == 1)
                {
                    modalPanel.Choice(dem [Random.Range(0, 6)]);
                    playerHealth.DecreaseTruth(Random.Range(-10, 30));
                    if (aff1 != playerAff1)
                    {
                        playerHealth.DecreaseHealth(20);
                    }
                }
                else if (aff2 == 1)
                {
                    modalPanel.Choice(rep [Random.Range(0, 5)]);
                    playerHealth.DecreaseTruth(Random.Range(-10, 30));
                    if (aff2 != playerAff2)
                    {
                        playerHealth.DecreaseHealth(20);
                    }
                }
                else if (gameObject.tag == "Bullet")
                {
                    modalPanel.Choice(que [queCount]);
                    playerHealth.DecreaseTruth(Random.Range(-50, 0));
                    playerAffiliation.incQueCount();
                }
                if (playerAffiliation != null)
                {
                    playerAffiliation.functionCalled = false;
                }
                updated = true;
            }
            else
            {
                modalPanel.Choice("You don't seem to get to the truth. What if you abandon the group and ask questions?")
            }
//			if (playerHealth != null) {
//
//
//			} else {
//				Debug.LogWarning ("No PlayerHealth found on EnemyTank.");
//			}
            //Destroy (this.gameObject);
        }
    }
Esempio n. 4
0
 public Player(PlayerAffiliation affiliation)
 {
     PlayerAffiliation = affiliation;
 }