void OnEnable() { Target = target as ParticleScale; m_scale = Target.scale; m_prevScale = m_scale; m_scaleGameObject = Target.scaleGameobject; m_prevScaleGameObject = m_scaleGameObject; }
public static void AddComponent() { var activeGameObject = Selection.activeGameObject; if (activeGameObject != null) { ParticleScale ps = activeGameObject.GetComponent <ParticleScale>(); if (ps == null) { activeGameObject.AddComponent <ParticleScale>(); } } }
public void GetRootObjByScene() { GameObject roots = GameObject.FindGameObjectWithTag("sceneRoot"); if (roots.name.Equals(BigWorldSystem.SCENENAME)) { m_scene_obj = roots; m_rootObj = roots.transform.Find(BigWorldSystem.ROOTNAME).gameObject; this.m_unLockEffect = m_rootObj.transform.Find("chengshiditu_jianzhujiesuo_UV").GetComponent <ParticleScale>(); this.m_unLockEffect.gameObject.SetActive(false); InputModule.Instance.Enable = true; return; } }
public BigWorldBuild(long buildId, GameObject buildObj, ParticleScale wallEffectMaterial) { this.m_BuildID = buildId; this.m_buildObj = buildObj; this.m_unlockMaterial = BigWorldGameObject.GetBuildCommonMatByName("UnLock.mat"); //this.m_cacheMaterial = cacheMaterial; this.m_confBuild = ConfBuilding.Get(buildId); long[] m_sceneIDs = CommonTools.StringToLongArray(m_confBuild.sceneIds); long[] m_completeTaskIDs = CommonTools.StringToLongArray(m_confBuild.taskIds); m_achorData = new BuidAchorData(buildId, m_sceneIDs, m_completeTaskIDs); this.status = 0; this.m_srcPos = buildObj.transform.position; //this.m_unlockMaterial = unLockMaterial; this.m_unLockEffect = wallEffectMaterial; //this.m_dimianEffectMat = dimainEffectMat; //Transform wallTran = buildObj.transform.Find("wall"); //if (wallTran != null) //{ // this.m_buildWall = wallTran.gameObject; // this.m_buildWall.SetActive(false); //} }