예제 #1
0
    void AssetLoadCallBack(GameObject ro, ParamData data)
    {
        //NGUITools.SetChildLayer(ro.transform, LayerMask.NameToLayer("3D"));
        //ro.transform.parent = Mpos;
        //ro.transform.localScale = new Vector3(300,300,300);
        //ro.transform.localPosition = Vector3.zero;
        //ro.transform.localRotation = Quaternion.Euler (10f, 180f, 0f);


        ro.transform.parent        = Mpos;
        ro.transform.localPosition = Vector3.forward * -300f;
        ro.transform.localScale    = new Vector3(400f, 400f, 400f);
        ro.transform.localRotation = Quaternion.Euler(0f, 180f, 0f);
        EffectLevel el = ro.AddComponent <EffectLevel>();

        el.target = ro.transform.parent.parent.GetComponent <UISprite>();


        if (babyObj != null)
        {
            Destroy(babyObj);
            babyObj = null;
        }
        babyObj = ro;
    }
예제 #2
0
파일: PhaseState.cs 프로젝트: TNOCS/csTouch
 private void addEffect(EffectLevel level)
 {
     var levelScore = levelToScore(level);
     if (levelScore <= 0) return;
     Count++;
     positiveScore += levelScore;
 }
예제 #3
0
    void AssetLoadEmployeeCallBack(GameObject ro, ParamData data)
    {
        if (hasDestroy_)
        {
            Destroy(ro);
            return;
        }
        TeamMemberCell tcell = findEmptyPos();

        tcell.heiObj.SetActive(false);
        tcell.huobanLable.gameObject.SetActive(true);
        //tcell.modPos.transform.localPosition = new Vector3 (20f,-166f,-100f);
        ro.transform.parent        = tcell.modPos;
        ro.name                    = data.iParam.ToString();
        tcell.gameObject.name      = data.iParam.ToString();
        ro.transform.localPosition = Vector3.zero;
        ro.transform.rotation      = new Quaternion(ro.transform.rotation.x, -180, ro.transform.rotation.z, ro.transform.rotation.w);
        ro.transform.localScale    = new Vector3(EntityAssetsData.GetData(data.iParam3).zoom_, EntityAssetsData.GetData(data.iParam3).zoom_, EntityAssetsData.GetData(data.iParam3).zoom_);
        Employee emp = GamePlayer.Instance.GetEmployeeById(data.iParam);

        tcell.NameLabel.text   = emp.InstName;
        tcell.levelLabel.text  = emp.GetIprop(PropertyType.PT_Level).ToString();
        tcell.preSp.spriteName = Profession.get((JobType)emp.GetIprop(PropertyType.PT_Profession), emp.GetIprop(PropertyType.PT_ProfessionLevel)).jobtype_.ToString();
        tcell.preLabel.text    = Profession.get((JobType)emp.GetIprop(PropertyType.PT_Profession), emp.GetIprop(PropertyType.PT_ProfessionLevel)).jobName_;
        ro.AddComponent <EffectLevel> ();
        EffectLevel el = ro.GetComponent <EffectLevel> ();

        el.target = tcell.gameObject.GetComponent <UIWidget>();
        //		ross.Add (roTitleClone);
        rosobj.Add(ro);
    }
예제 #4
0
 public static void AddGoList(EffectLevel eLevel)
 {
     if (eLevel != null)
     {
         EffectLevel.mGoList.Add(eLevel);
     }
 }
예제 #5
0
 public static void RemoveGoList(EffectLevel eLevel)
 {
     if (eLevel != null && EffectLevel.mGoList.Contains(eLevel))
     {
         EffectLevel.mGoList.Remove(eLevel);
     }
 }
예제 #6
0
 public static void SetEffectLevel(GameQuality level)
 {
     if (EffectLevel.iEffectLevel != level)
     {
         EffectLevel.iEffectLevel = level;
         EffectLevel.NoticeLevelChange(EffectLevel.iEffectLevel);
     }
 }
예제 #7
0
    void AssetLoadCallBack(GameObject ro, ParamData data)
    {
        ro.transform.parent        = mpos;
        ro.transform.localPosition = Vector3.forward * 100f;
        ro.transform.localScale    = new Vector3(400f, 400f, 400f);
        ro.transform.localRotation = Quaternion.Euler(0f, 180f, 0f);
        EffectLevel el = ro.AddComponent <EffectLevel>();

        el.target = ro.transform.parent.parent.GetComponent <UISprite>();
    }
예제 #8
0
 private static void NoticeLevelChange(GameQuality level)
 {
     for (int i = 0; i < EffectLevel.mGoList.Count; i++)
     {
         EffectLevel effectLevel = EffectLevel.mGoList[i];
         if (effectLevel != null)
         {
             effectLevel.LevelChange(level);
         }
     }
 }
예제 #9
0
    void AssetLoadCallBack(GameObject ro, ParamData data)
    {
        NGUITools.SetChildLayer(ro.transform, LayerMask.NameToLayer("3D"));
        ro.transform.parent           = ModelPos;
        ro.transform.localPosition    = Vector3.forward * 1000f;
        ModelPos.transform.localScale = Vector3.one;
        ro.transform.localPosition    = Vector3.one;
        ro.transform.LookAt(ApplicationEntry.Instance.ui3DCamera.transform.position);
        EffectLevel el = ro.AddComponent <EffectLevel>();

        el.target = ro.transform.parent.parent.GetComponent <UISprite>();
        babyObj   = ro;
    }
예제 #10
0
 void SetFiveEmployeeObjPosition()
 {
     for (int i = 0; i < FiveEmployeeObj.Count; i++)
     {
         FiveEmployeeObj[i].SetActive(true);
         FiveEmployeeObj[i].transform.parent        = fiveEmployeeList[i].transform.Find("modPos");
         FiveEmployeeObj[i].transform.localScale    = new Vector3(320f, 320f, 320f);
         FiveEmployeeObj[i].transform.localPosition = Vector3.forward * 100f;
         FiveEmployeeObj[i].transform.localRotation = Quaternion.Euler(0f, 180f, 0f);
         EffectLevel el = FiveEmployeeObj[i].AddComponent <EffectLevel>();
         el.target = FiveEmployeeObj[i].transform.parent.parent.GetComponent <UISprite>();
     }
 }
예제 #11
0
    private void Awake()
    {
        m_nodes = new GameObject[(int)EffectLevel.Count];
        for (var i = 0; i < m_nodes.Length; ++i)
        {
            var node = transform.Find(i.ToString());
            m_nodes[i] = node?.gameObject;
        }

        m_effectLevel = SettingsManager.instance ? (EffectLevel)SettingsManager.effectLevel : EffectLevel.Low;
        UpdateEffect();

        EventManager.AddEventListener(Events.VEDIO_SETTINGS_CHANGED, OnVideoSettingsChanged);
    }
예제 #12
0
    void AssetLoadCallBack(GameObject ro, ParamData data)
    {
        if (hasDestroyed_)
        {
            Destroy(ro);
            return;
        }
        playerObj                  = ro;
        ro.transform.parent        = mpos;
        ro.transform.localPosition = Vector3.forward * -1000f;
        ro.transform.localRotation = new Quaternion(ro.transform.localRotation.x, -180, ro.transform.localRotation.z, ro.transform.localRotation.w);
        ro.transform.localScale    = new Vector3(EntityAssetsData.GetData(data.iParam2).zoom_, EntityAssetsData.GetData(data.iParam2).zoom_, EntityAssetsData.GetData(data.iParam2).zoom_);
        EffectLevel el = ro.AddComponent <EffectLevel>();

        el.target = ro.transform.parent.parent.GetComponent <UISprite>();
    }
예제 #13
0
    void AssetLoadCallBack(GameObject ro, ParamData data)
    {
        ro.transform.parent        = Mpos;
        ro.transform.localScale    = new Vector3(300, 300, 1f);
        ro.transform.localPosition = Vector3.forward * -1000f;
        ro.transform.localRotation = Quaternion.Euler(10f, 180f, 0f);
        EffectLevel el = ro.AddComponent <EffectLevel>();

        el.target = ro.transform.parent.parent.GetComponent <UISprite>();
        if (babyObj != null)
        {
            Destroy(babyObj);
            babyObj = null;
        }
        babyObj = ro;
    }
예제 #14
0
    void AssetLoadCallBack(GameObject ro, ParamData data)
    {
        if (hasDestroy_)
        {
            Destroy(ro);
            return;
        }
        //RestMemberCellUI ();
        COM_SimplePlayerInst csi = TeamSystem.GetTeamMemberByIndex(data.iParam2);

        if (csi == null)
        {
            Destroy(ro);
            return; /// 这里可能有问题
        }
        ro.name = csi.instId_.ToString();
        TeamMemberCell tell;

        if (int.Parse(ro.name) == TeamSystem.GetTeamMembers()[0].instId_)
        {
            tell = teamCells[0].GetComponent <TeamMemberCell>();
            UIManager.SetButtonEventHandler(teamCells[0].gameObject, EnumButtonEvent.OnClick, OnClickShowTips, 0, 0);
        }
        else
        {
            tell = findEmptyPos();
        }
        ro.transform.parent = tell.modPos;

        //tell.modPos.transform.localPosition = new Vector3 (20f,-166f,-100f);
        tell.gameObject.name       = csi.instId_.ToString();
        ro.transform.localPosition = Vector3.zero;
        ro.transform.rotation      = new Quaternion(ro.transform.rotation.x, -180, ro.transform.rotation.z, ro.transform.rotation.w);
        ro.transform.localScale    = new Vector3(EntityAssetsData.GetData(data.iParam3).zoom_, EntityAssetsData.GetData(data.iParam3).zoom_, EntityAssetsData.GetData(data.iParam3).zoom_);
        tell.PlayerInst            = csi;
        ro.AddComponent <EffectLevel> ();
        EffectLevel el = ro.GetComponent <EffectLevel> ();

        el.target = tell.gameObject.GetComponent <UIWidget>();
        rosobj.Add(ro);
        UpdateUI();
    }
예제 #15
0
    void AssetLoadCallBack(GameObject ro, ParamData data)
    {
        if (!this.gameObject.activeSelf)
        {
            return;
        }
        if (babyObj != null)
        {
            Destroy(ro);
        }
        //NGUITools.SetChildLayer(ro.transform, LayerMask.NameToLayer("3D"));
        ro.transform.parent     = mpos;
        ro.transform.localScale = new Vector3(400f, 400f, 400f);
        //ro.transform.localPosition = Vector3.zero;
        ro.transform.localPosition = Vector3.forward * -40;
        ro.transform.localRotation = new Quaternion(ro.transform.localRotation.x, 180f, ro.transform.localRotation.z, ro.transform.localRotation.w) /*Quaternion.Euler (10f, 180f, 0f)*/;
        EffectLevel el = ro.AddComponent <EffectLevel>();

        el.target = ro.transform.parent.parent.GetComponent <UISprite>();
        babyObj   = ro;
    }
예제 #16
0
    void AssetLoadCallBack(GameObject ro, ParamData data)
    {
        if (hasDestroy)
        {
            DestroyBaby((ENTITY_ID)data.iParam, true, ro);
            return;
        }
//        Baby inst = GamePlayer.Instance.GetBabyInst(data.iParam);
//        modelName_.text = inst.InstName;
//        modelRace_.spriteName = BabyData.GetData(inst.GetIprop(PropertyType.PT_TableId)).RaceIcon_;
        ro.transform.parent           = modesPos;
        modesPos.transform.localScale = Vector3.one;
        ro.transform.localPosition    = Vector3.forward * -700;
        ro.transform.localScale       = new Vector3(EntityAssetsData.GetData(data.iParam2).zoom_, EntityAssetsData.GetData(data.iParam2).zoom_, EntityAssetsData.GetData(data.iParam2).zoom_);
        ro.transform.rotation         = new Quaternion(ro.transform.rotation.x, 180, ro.transform.rotation.z, ro.transform.rotation.w);
        // ro.transform.LookAt(ApplicationEntry.Instance.ui3DCamera.transform.position);
        EffectLevel el = ro.AddComponent <EffectLevel>();

        el.target = ro.transform.parent.parent.GetComponent <UISprite>();
        if (babyObj != null)
        {
            Destroy(babyObj);
        }
        babyObj = ro;
        if (MainbabyUI.Instance.isState && !BankSystem.instance.isopen)
        {
            babyObj.SetActive(true);
        }
        else
        {
            babyObj.SetActive(false);
        }
//		if(!BankSystem.isopen)
//		{
//			babyObj.SetActive(true);
//		}else
//		{
//			babyObj.SetActive(false);
//		}
    }
예제 #17
0
    public static void AddEffect(EffectType effectType, EffectLevel effectLevel)
    {
        switch (effectType)
        {
        case EffectType.scoreDouble:
        {
            isScoreDouble = effectLevel;
            return;
        }

        case EffectType.jumpHigher:
        {
            isJumpHigher = effectLevel;
            return;
        }

        case EffectType.hpUp:
        {
            isJumpHigher = effectLevel;
            return;
        }
        }
    }
예제 #18
0
파일: PhaseState.cs 프로젝트: TNOCS/csTouch
 private int levelToScore(EffectLevel level)
 {
     switch(level)
     {
         case EffectLevel.Low:    return  25;
         case EffectLevel.Medium: return  50;
         case EffectLevel.High:   return 100;
         default: return 0;
     }
 }
예제 #19
0
 private void OnVideoSettingsChanged()
 {
     effectLevel = (EffectLevel)SettingsManager.effectLevel;
 }
예제 #20
0
 private void Start()
 {
     EffectLevel.AddGoList(this);
     this.StartELevel();
     this.LevelChange(EffectLevel.iEffectLevel);
 }
예제 #21
0
파일: PhaseState.cs 프로젝트: TNOCS/csTouch
 public EffectState(string name, EffectLevel level, bool isDisturbance) : this(name, level)
 {
     this.isDisturbance = isDisturbance;
 }
예제 #22
0
 private void Destroy()
 {
     this.DestoryELevel();
     EffectLevel.RemoveGoList(this);
 }
예제 #23
0
파일: PhaseState.cs 프로젝트: TNOCS/csTouch
 public EffectState(string name, EffectLevel level) : this(name)
 {
     addEffect(level);
 }