Exemple #1
0
    protected virtual void Awake()
    {
        this.UpgradePrice = 100;
        this.bank         = GetComponentInParent <BankBehaviour>();

        this.ShotFired += GameObject.Find("GameFeel").GetComponent <CameraModifier>().ShotFiredHandler;
        this.ShotFired += GameObject.Find("GameFeel").GetComponent <SoundPlayer>().ShotFiredHandler;

        upgradeIcon.gameObject.SetActive(false);
    }
Exemple #2
0
    // Use this for initialization
    void Start()
    {
        if (!GetComponentInParent <NetworkIdentity>().isLocalPlayer)
        {
            return;
        }

        bank = GetComponentInParent <BankBehaviour>();

        mins   = new List <Vector2>();
        maxs   = new List <Vector2>();
        scales = new List <Vector3>();

        foreach (Transform child in GameObject.Find("UI:Weapons").transform)
        {
            UIPanels.Add(child.gameObject);
            mins.Add(child.gameObject.GetComponent <RectTransform>().anchorMin);
            maxs.Add(child.gameObject.GetComponent <RectTransform>().anchorMax);
            scales.Add(child.gameObject.GetComponent <RectTransform>().localScale);
        }
    }