Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        Character = Character.GetComponent <Char_Manager>();

        _Laser = transform.Find("Sniper").gameObject;
        _Laser.SetActive(false);

        _Shotgun = transform.Find("Shotgun").gameObject;
        _Shotgun.SetActive(false);

        _Mine = transform.Find("Mine").gameObject;
        _Mine.SetActive(false);

        _Grenade = transform.Find("Grenade").gameObject;
        _Grenade.SetActive(false);

        _Shield       = transform.Find("Shield").gameObject.GetComponent <Image>();
        _Color        = _Shield.color;
        _Color.a      = 0.0f;
        _Shield.color = _Color;

        _PreviousWeapon = WeaponType.Mines;
        EnableWeapon(Character._Weapon);
    }
Exemplo n.º 2
0
    Char_Manager ManagerScript; //Link to the manager

    void Start()
    {
        ManagerScript = GetComponent <Char_Manager>();
    }