Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     Debug.Log("AlcoHera");
     hero = GameObject.Find("Hero").GetComponent <Hero>();
     dt   = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     effectPoison();
 }
Exemplo n.º 2
0
 private void Start()
 {
     hero = GameObject.Find("Hero").GetComponent <Hero>();
     dt   = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     previousStateHero = hero.health;
     DrugsStat.drugsHeraValue++;
 }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     Debug.Log("AlcoHera");
     hero = GameObject.Find("Hero").GetComponent <Hero>();
     dt   = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     previousStateHero = hero.health;
 }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     hero           = GameObject.Find("Hero").GetComponent <Hero>();
     dt             = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     Time.timeScale = 1.4f;
     time           = Time.time;
 }
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     hero           = GameObject.Find("Hero").GetComponent <Hero>();
     dt             = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     hero.speed    += 15;
     Time.timeScale = 0.35f;
 }
Exemplo n.º 6
0
 void Start()
 {
     hero = GameObject.Find("Hero").GetComponent <Hero>();
     dt   = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     cam  = GameObject.Find("Main Camera").GetComponent <Camera>();
     DrugsStat.drugsMocarzValue++;
 }
Exemplo n.º 7
0
 void Start()
 {
     anim            = GetComponent <Animator>();
     hero            = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     go_forwad       = true;
     currentState    = statePATH;
     targetpathPoint = 0;
     // pathPoints = new List<Transform>();
     alive                  = true;
     rotacja_orginalna      = transform.rotation.eulerAngles;
     punkty_powrotne        = new List <Vector3>();
     czas_pomiedzy_punktami = 0.2f;
     if (GameObject.FindWithTag("Player"))
     {
         player = GameObject.FindWithTag("Player");
     }
     wrog  = this.GetComponent <Rigidbody2D>();
     time  = Time.time;
     spawn = this.transform.position;
     if (this.transform.Find("FirePoint"))
     {
         fire_point = this.transform.Find("FirePoint");
     }
     time_tracker_strzalu  = Time.time;
     w_zasiegu_ataku_wrecz = false;
     time_tracker_gonga    = Time.time;
     time_tracker_powrotu  = Time.time;
 }
Exemplo n.º 8
0
    void Start()
    {
        AmazingEffectFunctions = new List <Action>();
        FillAmazingEffectList();

        hero = GameObject.Find("Hero").GetComponent <DrugsTimer>();
        indexOfCurrentPath = 0;
        Random random = new Random();

        if (generate_the_path(200))
        {
            //Debug.Log("jest sciezka");
            if (GameObject.FindWithTag("Player"))
            {
                player = GameObject.FindWithTag("Player");
            }
        }

        if (this.transform.Find("FirePoint"))
        {
            fire_point = this.transform.Find("FirePoint");
        }

        enemy           = this.GetComponent <Rigidbody2D>();
        anim            = this.GetComponent <Animator>();
        aItarget        = this.GetComponent <AIDestinationSetter>();
        aIPath          = this.GetComponent <AIPath>();
        aItarget.target = null;

        spawn                    = this.transform.position;
        spawn_rotation           = this.transform.rotation;
        alive                    = true;
        in_range_of_punch_attack = false;

        time_tracker_shoot             = Time.time;
        time_tracker_punch             = Time.time;
        time_tracker_come_back_to_path = Time.time;

        last_seen_player = spawn;

        guide = Instantiate(new GameObject(), spawn, spawn_rotation);
        if (guide != null)
        {
            aItarget.target = guide.transform;
        }

        aIPath.maxSpeed    = this.speed;
        time_tracker_shoot = Time.time;
        generate_the_path(50);
        avoid_bullets_timer = Time.time;
        if (isStatic)
        {
            aItarget.target = null;
        }
        avoid_bullets_movement = new Vector3(0, 0, 0);
    }
    // Use this for initialization
    void Start()
    {
        Debug.Log("AlcoSpeed");
        hero = GameObject.Find("Hero").GetComponent <Hero>();
        dt   = GameObject.Find("Hero").GetComponent <DrugsTimer>();
        dt.removeNarcotic("vodka");
        var sound = this.GetComponent <AudioSource>();

        timeBeforeDestroy = sound.clip.length;
        time = Time.time;
    }
Exemplo n.º 10
0
 private void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "Player")
     {
         heroDrugTimer  = other.gameObject.GetComponent <DrugsTimer>();
         hero           = other.gameObject.GetComponent <Hero>();
         playerOnTarget = true;
         time          += 1;
     }
     else
     {
         playerOnTarget = false;
     }
 }
Exemplo n.º 11
0
 // Use this for initialization
 void Start()
 {
     hero          = GameObject.Find("Hero").GetComponent <Hero>();
     drugsTimer    = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     time          = Time.time;
     maxHp         = hero.maxHeath;
     speed         = hero.speed;
     hero.hangover = true;
     //Debug.Log("Dupka XDDDDDDDDD " + !drugsTimer.onDrugs);
     if (!drugsTimer.onDrugs)
     {
         //Debug.Log("Dupka XDDDDDDDDD");
         GameObject.Find("NarcoManager").GetComponent <NarcoManager>().hangoverStart();
     }
 }
Exemplo n.º 12
0
 private void OnTriggerStay2D(Collider2D collision)
 {
     if (collision.tag == "Player" && this.gameObject.tag == "Stimulants")
     {
         hero          = collision.GetComponent <Hero>();
         heroDrugTimer = collision.GetComponent <DrugsTimer>();
         if (Input.GetMouseButton(1))
         {
             if (drugEffect != null)
             {
                 Instantiate(drugEffect);
             }
             destroyObject();
             heroDrugTimer.addNarcotic(this);
             hero.poisoning += poison_points;
         }
     }
 }
Exemplo n.º 13
0
 // Use this for initialization
 void Start()
 {
     dt = GameObject.Find("Hero").GetComponent <DrugsTimer>();
 }
Exemplo n.º 14
0
 // Use this for initialization
 void Start()
 {
     dt = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     achievementsControllScript = GameObject.Find("Hero").GetComponent <AchievementsControllScript>();
 }
Exemplo n.º 15
0
 // Use this for initialization
 void Start()
 {
     hero = GameObject.Find("Hero").GetComponent <Hero>();
     dt   = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     hc   = hero.GetComponent <HeroController> ();
 }
Exemplo n.º 16
0
 // Use this for initialization
 void Start()
 {
     drugsTimer = GameObject.Find("Hero").GetComponent <DrugsTimer>();
     DrugsStat.drugsMethValue++;
 }