new public bool Init(FUI2dLocManager locManager, FUI2dLocManager.IconLocObjectTypes type, GameObject target, bool target3d, float dur) { Debug.LogWarning("Init from IconLocCannon.cs"); bool isInit = false; isInit = base.Init(locManager, type, target, target3d, dur); if (!isInit) { // we failed, return false; return(isInit); } else { isInit = false; // reset to false // test to see if we have cannon isInit = SetCannon(); } return(isInit); }
/// <summary> /// Initialized this object from the Manager /// </param> /// </summary> public bool Init(FUI2dLocManager locManager, FUI2dLocManager.IconLocObjectTypes type, GameObject target, bool target3d, float dur) { if (target == null) { Debug.LogError("Trying to init IconLocObject with invalid Target"); return(false); } myManager = locManager; _type = type; _target = target; _isTarget3d = target3d; duration = dur; _isActive = true; // using NGUI Tools to make sure the entire object and children are active. // Deactive will not make the parent and children gameobject inactive Activate(); // NGUITools.SetActive(this.gameObject, _isActive); return(_isActive); }