// Start is called before the first frame update
    protected virtual void Awake()
    {
        gameDirector    = gameDirectorObject.GetComponent <GameDirector>();
        trumpController = gameDirectorObject.GetComponent <TrumpController>();

        characterCardSprites = new List <SpriteRenderer>();
        characterCardSprites =
            GetComponentsInChildren <SpriteRenderer>().ToList();
    }
 // Use this for initialization
 void Start()
 {
     currentHealth             = startingHealth;
     playerAudio               = GetComponent <AudioSource>();
     trumpController           = GetComponent <TrumpController>();
     fullHealth.enabled        = true;
     threeQuaterHealth.enabled = false;
     halfHealth.enabled        = false;
     quarterHealth.enabled     = false;
 }
Example #3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.CompareTag("PlayerBullet"))
     {
         killCount++;
         textScript.SetKillText(killCount);
         if (killCount >= 2 && !donaldSpawned)
         {
             Transform       instantiatedDonald = Instantiate(theDonald, new Vector3(0, (float)7.68, 0), transform.rotation);
             TrumpController trumpScript        = instantiatedDonald.GetComponent <TrumpController>();
             trumpScript.player = player;
             donaldSpawned      = true;
         }
         Instantiate(explosion, transform.position, transform.rotation);
         Destroy(other.gameObject);
         Destroy(this.gameObject);
     }
 }
Example #4
0
    void Start()
    {
        gameClearPanel.SetActive(false);
        gameOverPanel.SetActive(false);

        trumpController  = GetComponent <TrumpController>();
        buttonController = GetComponent <ButtonController>();

        if (stageEnum == StageEnum.Normal)
        {
            playerController.Money = defaultPlayersMoney;
        }

        playerController.Bet = minBet;

        BackGround();
        ResetField();

        buttonController.enabled = true;
    }
 void Awake()
 {
     Instance        = this;
     pushTweet_sound = GetComponent <AudioSource> ();
 }