Example #1
0
    void Start()
    {
        //Chamar referencias
        Trap       = GameObject.FindGameObjectWithTag("Trap");
        TrapScript = Trap.GetComponent <Trap2>();

        Trap3       = GameObject.FindGameObjectWithTag("Trap2");
        TrapScript2 = Trap3.GetComponent <Trap3>();

        ArrowSpawner  = GameObject.FindGameObjectWithTag("ArrowSpawner"); // Define ArrowSpawner como o objeto
        VelocidadeATK = ArrowSpawner.GetComponent <ArrowSpawn>();

        player       = GameObject.FindGameObjectWithTag("Player"); // define player como a tag Player
        playerHealth = player.GetComponent <Player_HP>();          // define playerHealth como o script Player HP
        Anim         = GetComponent <Animator>();

        LevelLoader = GameObject.Find("LevelLoader");
        LVLScript   = LevelLoader.GetComponent <LevelLoader>();

        audioS = gameObject.GetComponent <AudioSource>();

        // cor do boss
        SprRen = GetComponent <SpriteRenderer>();

        // Define vida
        VidaInicial      = 230;
        VidaAtual        = VidaInicial;
        BossSlider.value = VidaInicial;

        // Tempo dos ataques
        tempoATK = Random.Range(minTime, MaxTime); // define que o tempo sera um random entre o minimo e max
    }
Example #2
0
 public void LabelToString()
 {
     lblMoney.Text = Money.ToString();
     lblTrap1.Text = Trap1.ToString();
     lblTrap2.Text = Trap2.ToString();
     lblTrap3.Text = Trap3.ToString();
     lblTrap4.Text = Trap4.ToString();
 }
Example #3
0
    // Void Start
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        // Chamando definições
        Trap       = GameObject.FindGameObjectWithTag("Trap");
        TrapScript = Trap.GetComponent <Trap2>();

        Trap3       = GameObject.FindGameObjectWithTag("Trap2");
        TrapScript2 = Trap3.GetComponent <Trap3>();

        ArrowSpawner = GameObject.FindGameObjectWithTag("ArrowSpawner");
        SpawnFlecha  = ArrowSpawner.GetComponent <ArrowSpawn>();

        Boss      = GameObject.FindGameObjectWithTag("Boss");
        BossStage = Boss.GetComponent <BossScript>();

        timer = Random.Range(minTime, MaxTime);
    }
Example #4
0
        private void _parse()
        {
            _hdr       = new AsnHdr(m_io, this, m_root);
            _version   = new AsnObj(m_io, this, m_root);
            _community = new AsnObj(m_io, this, m_root);
            _pduType   = new AsnHdr(m_io, this, m_root);
            switch (PduType.Tag)
            {
            case AsnTypeTag.SnmpPduTrapv1: {
                _data = new Trap1(m_io, this, m_root);
                break;
            }

            case AsnTypeTag.SnmpPduTrapv2: {
                _data = new Trap2(m_io, this, m_root);
                break;
            }

            case AsnTypeTag.SnmpPduSet: {
                _data = new SetRequest(m_io, this, m_root);
                break;
            }

            case AsnTypeTag.SnmpPduResponse: {
                _data = new Response(m_io, this, m_root);
                break;
            }

            case AsnTypeTag.SnmpPduGet: {
                _data = new GetRequest(m_io, this, m_root);
                break;
            }

            case AsnTypeTag.SnmpPduGetnext: {
                _data = new GetNextRequest(m_io, this, m_root);
                break;
            }
            }
        }