Ejemplo n.º 1
0
    public void FoundGhost()
    {
        Debug.Log("Found a ghost!");
        CanvasPlayerUIObject.transform.Find("GhunterCaughtGhost").gameObject.SetActive(true);
        WinLoseScript MainWinLoseScript = GameObject.Find("EventSystem").GetComponent <WinLoseScript>();

        MainWinLoseScript.WinGhunter("FoundGhosts");
    }
Ejemplo n.º 2
0
 // Update is called once per frame
 void Update()
 {
     if (enemiesRemaining <= 0)
     {
         WinLoseScript wlScript = (WinLoseScript)WinLose.GetComponent(typeof(WinLoseScript));
         wlScript.Win();
     }
 }
 // Use this for initialization
 void Start()
 {
     levelManagement = FindObjectOfType <LevelManagement>();
     gaurdMovement   = FindObjectOfType <GaurdMovement>();
     FollowCursor    = FindObjectOfType <followCursor>();
     winLose         = FindObjectOfType <WinLoseScript>();
     carried         = FindObjectOfType <Carried>();
     speed           = moveSpeed;
 }
Ejemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        //dies
        if (health <= 0 && alive)
        {
            WinLoseScript wlScript = (WinLoseScript)winLose.GetComponent(typeof(WinLoseScript));
            wlScript.Lose();
            alive = false;
            health--;
            AimTowardMouse aimer   = (AimTowardMouse)GetComponent(typeof(AimTowardMouse));
            MovePlayer     mover   = (MovePlayer)GetComponent(typeof(MovePlayer));
            Shoot          shooter = (Shoot)bulletEmitter.GetComponent(typeof(Shoot));
            aimer.kill();
            mover.kill();
            shooter.kill();


            GameObject           tempRD   = Instantiate(ragdoll, transform.position, transform.rotation);
            PlayerRagdollHandler rHandler = (PlayerRagdollHandler)tempRD.GetComponent(typeof(PlayerRagdollHandler));
            rHandler.pushRagdoll(pushValue);
            Destroy(gameObject);
        }
    }
Ejemplo n.º 5
0
 private void Start()
 {
     winLoseScript = GetComponent <WinLoseScript>();
     myOwnCollider = GetComponent <BoxCollider>();
 }
Ejemplo n.º 6
0
 // Start is called before the first frame update
 void Start()
 {
     wlref = GameObject.Find("winTrigger").GetComponent <WinLoseScript>();
 }
Ejemplo n.º 7
0
 void Start()
 {
     //mySPR = GetComponent<SpriteRenderer>();
     endGame = GameObject.FindGameObjectWithTag("WinLose").GetComponent <WinLoseScript>();;
 }
 // Start is called before the first frame update
 void Start()
 {
     StartCoroutine(CountDown());
     MainWinLoseScript = GameObject.Find("EventSystem").GetComponent <WinLoseScript>();
 }