public void Initialize() { singleton = this; playerW = FindObjectOfType(typeof(PlayerWeapons)) as PlayerWeapons; slotInfo = FindObjectOfType(typeof(SlotInfo)) as SlotInfo; WeaponInfoArray = FindObjectsOfType(typeof(WeaponInfo)) as WeaponInfo[]; foreach (WeaponInfo w in WeaponInfoArray) { if (w.weaponClass == WeaponInfo.weaponClasses.Null) { nullWeapon = w.gameObject; } } setupWeaponClassNames(); setupWeaponInfoByClass(); }
public void Start() { store = FindObjectOfType <DBStoreController>(); store.Initialize(); if (sPosX < 0 || sPosY < 0) { // center the store sPosX = Screen.width / 2 - (HWidth + LSWidth) / 2; sPosY = Screen.height / 2 - (HHeight + LSHeight) / 2; } popupUpgradeRect = new Rect(sPosX + 30, sPosY + 60, popupUpgradeWidth, popupUpgradeHeight); popupLockedRect = new Rect(sPosX + LSWidth + 50, sPosY + HHeight + 50, 200, 200); wcIcons = FindObjectOfType <WeaponClassIcons>(); setupLS(lsBuy); setuplsBuyContent(); setupLS(lsEquip); setuplsEquipContent(); setupHeader(); setupMD(mdBuy); setupMD(mdEquip); }
void Start() { playerWeapons = PlayerWeapons.PW; store = FindObjectOfType <DBStoreController>(); singleton = this; }