Example #1
0
    //换弹夹
    void Reload(LTEvent ent = null)
    {
        if (isReloading)
        {
            return;
        }
        int refillCount = magSize - curMagSize;

        if (curBulltCount < refillCount)
        {
            refillCount = curBulltCount;
        }
        curBulltCount -= refillCount;
        curMagSize    += refillCount;
        if (anim)
        {
            isReloading = true;
            anim.SetTrigger("reload");
        }
        else
        {
            UpdateBulletDisplay();
            isReloading = false;
        }
        //isBulltOk = false;
    }
Example #2
0
 /// <summary>
 /// 重新填充
 /// </summary>
 public void Refill(LTEvent evt)
 {
     SoundManager.Instance.PlaySound(SoundManager.SoundType.WeaponEqiuped);
     //curMagSize = magSize;
     curBulltCount += BulletCount;
     UpdateBulletDisplay();
 }
Example #3
0
 public void UpdateBulletDisplay(LTEvent evt)
 {
     if (bulletClipText != null && evt.data != null)
     {
         bulletClipText.text = evt.data.ToString();
     }
 }
Example #4
0
 static public int set_id(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         LTEvent      self = (LTEvent)checkSelf(l);
         System.Int32 v;
         checkType(l, 2, out v);
         self.id = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Example #5
0
 void OnMoneyUsed(LTEvent evt)
 {
     if (evt.data != null)
     {
         UseMoney(ConvertUtil.ToInt32(evt.data, 0));
     }
 }
 public void Call(LTEvent param0)
 {
     func.BeginPCall();
     func.PushObject(param0);
     func.PCall();
     func.EndPCall();
 }
Example #7
0
 static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         LTEvent      o;
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Object a2;
         checkType(l, 3, out a2);
         o = new LTEvent(a1, a2);
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
    void changeColor(LTEvent e)
    {
        Transform tran     = (Transform)e.data;
        float     distance = Vector3.Distance(tran.position, transform.position);
        Vector3   to       = new Vector3(Random.Range(0f, 1f), 0f, Random.Range(0f, 1f));

        LeanTween.value(gameObject, updateColor, fromColor, to, 0.8f).setRepeat(2).setLoopPingPong().setDelay(distance * 0.05f);
    }
 public void CallWithSelf(LTEvent param0)
 {
     func.BeginPCall();
     func.Push(self);
     func.PushObject(param0);
     func.PCall();
     func.EndPCall();
 }
Example #10
0
    //void

    void OnCameraShake(LTEvent evt)
    {
        Vector3 amount = defaultShakeAmount;
        if(evt.data != null)
        {
            amount = (Vector3)evt.data;
        }
        iTween.ShakePosition(gameObject, amount, 0.5f);
    }
Example #11
0
        static internal void Lua_System_Action_1_LTEvent(LuaFunction ld, LTEvent a1)
        {
            IntPtr l     = ld.L;
            int    error = pushTry(l);

            pushValue(l, a1);
            ld.pcall(1, error);
            LuaDLL.lua_settop(l, error - 1);
        }
Example #12
0
 void OnGameMainMenu(LTEvent evt)
 {
     GameGlobalValue.s_CurrentScene = s_MainMenuSceneId;
     //bool isShowLoading = true;
     //if(evt.data != null)
     //{
     //    bool.TryParse(evt.data.ToString(), out isShowLoading);
     //}
     Loading(false);
 }
Example #13
0
 void OnGameNext(LTEvent evt)
 {
     if (GameGlobalValue.IsLastLevel(GameGlobalValue.s_CurrentLevel))
         OnGameMainMenu(evt);
     else
     {
         GameGlobalValue.s_CurrentLevel += 1;
         Application.LoadLevel(Application.loadedLevel);
     }
 }
Example #14
0
    /// <summary>
    /// 监听敌人死亡
    /// </summary>
    /// <param name="evt"></param>
    void OnEnemyDie(LTEvent evt)
    {
        bool isHeadShot = ConvertUtil.ToBool(evt.data);

        if (isHeadShot)
        {
            AddEnergy(headshotEnergy);
            ShowIcon(IconType.HeadShot);
        }
    }
Example #15
0
	void changeColor( LTEvent e ){
		Transform tran = (Transform)e.data;
		float distance = Vector3.Distance( tran.position, transform.position);
		Color to = new Color(Random.Range(0f,1f),0f,Random.Range(0f,1f));
		LeanTween.value( gameObject, fromColor, to, 0.8f ).setRepeat(2).setLoopPingPong().setDelay(distance*0.05f).setOnUpdate(
			(Color col)=>{
				GetComponent<Renderer>().material.color = col;
			}
		);
	}
Example #16
0
    void OnWaveCompleted(LTEvent evt)
    {
        int wave = ConvertUtil.ToInt32(evt.data);

        if (wave > 0)
        {
            AddEnergy(wave);
            ShowIcon(IconType.WaveComplete);
        }
    }
Example #17
0
    /// <summary>
    /// 监听连杀
    /// </summary>
    /// <param name="evt"></param>
    void OnEnemyCombo(LTEvent evt)
    {
        int combo = ConvertUtil.ToInt32(evt.data);

        if (combo >= killingSpreeCombo)
        {
            AddEnergy(killingSpreeEnergy);
            ShowIcon(IconType.Slaughter);
        }
    }
	void changeColor( LTEvent e ){
		Transform tran = (Transform)e.data;
		float distance = Vector3.Distance( tran.position, transform.position);
		Color to = new Color(Random.Range(0f,1f),0f,Random.Range(0f,1f));
		LeanTween.value( gameObject, fromColor, to, 0.8f ).setLoopPingPong(1).setDelay(distance*0.05f).setOnUpdate(
			(Color col)=>{
				GetComponent<Renderer>().material.color = col;
			}
		);
	}
Example #19
0
    //void

    void OnCameraShake(LTEvent evt)
    {
        Vector3 amount = defaultShakeAmount;

        if (evt.data != null)
        {
            amount = (Vector3)evt.data;
        }
        iTween.ShakePosition(gameObject, amount, 0.5f);
    }
Example #20
0
    void OnGameMainMenu(LTEvent evt)
    {

        GameGlobalValue.s_CurrentScene = s_MainMenuSceneId;
        //bool isShowLoading = true;
        //if(evt.data != null)
        //{
        //    bool.TryParse(evt.data.ToString(), out isShowLoading);
        //}
        Loading(false);
    }
Example #21
0
 public void OnExitEnergyPower(LTEvent evt)
 {
     if (powerWeapon != null)
     {
         powerWeapon.WeaponOut(() =>
         {
             powerWeapon.gameObject.transform.parent.gameObject.SetActive(false);
             currentWeapon.WeaponIn();
             isInEnergyPower = false;
         });
     }
 }
Example #22
0
 void OnGameNext(LTEvent evt)
 {
     if (GameGlobalValue.IsLastLevel(GameGlobalValue.s_CurrentLevel))
     {
         OnGameMainMenu(evt);
     }
     else
     {
         GameGlobalValue.s_CurrentLevel += 1;
         Application.LoadLevel(Application.loadedLevel);
     }
 }
Example #23
0
 static public int get_data(IntPtr l)
 {
     try {
         LTEvent self = (LTEvent)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.data);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #24
0
 /// <summary>
 /// 获得医疗包
 /// </summary>
 /// <param name="evt"></param>
 void OnGetMedKit(LTEvent evt)
 {
     if (evt.data != null)
     {
         float addedValue = 0.0f;
         if (float.TryParse(evt.data.ToString(), out addedValue))
         {
             AddLife(addedValue);
         }
         //SoundManager.Instance.PlaySound(SoundManager.SoundType.GetLife);
     }
 }
Example #25
0
 static public int set_data(IntPtr l)
 {
     try {
         LTEvent       self = (LTEvent)checkSelf(l);
         System.Object v;
         checkType(l, 2, out v);
         self.data = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Example #26
0
 void OnVideoClosed(LTEvent evt)
 {
     LeanTween.removeListener((int)Events.VIDEOREWARD, OnVideoRewarded);
     LeanTween.removeListener((int)Events.VIDEOCLOSED, OnVideoClosed);
     if (videoRewarded)
     {
         // GameContinue();
         GameReward();
     }
     else
     {
         GameFinish();
     }
 }
Example #27
0
 public void OnEnterEnergyPower(LTEvent evt)
 {
     isInEnergyPower = true;
     currentWeapon.WeaponOut(() =>
     {
         //currentWeapon.gameObject.transform.parent.gameObject.SetActive(false);
         if (powerWeapon != null)
         {
             //powerWeapon.gameObject.transform.position = new Vector3(powerWeapon.gameObject.transform.position.x, -10, powerWeapon.gameObject.transform.position.z);
             powerWeapon.gameObject.transform.parent.gameObject.SetActive(true);
             powerWeapon.WeaponIn();
             //LeanTween.moveLocalY(powerWeapon.gameObject, -3.4f, 1f);
         }
     });
 }
Example #28
0
    void CreateBlood(LTEvent evt)
    {
        if (bloods == null)
            return;

        GameObject blood = bloods[Random.Range(0, bloods.Length)];
        if (blood != null)
        {
            Vector3 createPos = new Vector3(Random.Range(-maxX, maxX), Random.Range(-maxY, maxY), 1);
            var created = (GameObject)Instantiate(blood, createPos, Quaternion.Euler(0, 0, Random.Range(0, 360)));
            float scale = Random.Range(5f, 8f);
            created.transform.localScale = new Vector3(scale, scale, 1);
            created.transform.SetParent(Camera.main.transform);
        }

    }
Example #29
0
 /// <summary>
 /// 获得盾牌道具
 /// </summary>
 /// <param name="obj"></param>
 private void OnGetShield(LTEvent evt)
 {
     // throw new NotImplementedException();
     if (evt.data != null)
     {
         float addedVal = 0.0f;
         if (float.TryParse(evt.data.ToString(), out addedVal))
         {
             this.haveShield  = true;
             shieldValue     += (addedVal / 100) * playerMaxHP;
             qurShieldValue   = shieldValue / 4;
             curQurShildValue = qurShieldValue;
             UIManager.Instance.ShowShield();
         }
     }
 }
Example #30
0
 private void OnGameFinish(LTEvent obj)
 {
     //throw new NotImplementedException();
     if (obj.data != null)
     {
         var record = obj.data as GameRecords;
         if (record != null)
         {
             UseMoney(-GameValue.moneyPerTimeLeft * record.TimeLeft);
             if (record.FinishType == GameFinishType.Completed)
             {
                 SetLevelRecord(record.MapId, record.Level);
             }
         }
     }
 }
Example #31
0
    public void MoveScoopHorizontally(LTEvent e)
    {
        SwipeInfo.SwipeDirection direction = (SwipeInfo.SwipeDirection)e.data;
        Vector2Int nextIndex       = board.GetNextIndex(new Vector2Int(board.ConeLane(), currentIndex.y), direction);
        Vector3    nextPosition    = board.GetPosition(nextIndex);
        Vector3    currentPosition = board.GetPosition(currentIndex);
        float      scaleMagnitude  = .05f * Mathf.Clamp(currentIndex.y, 0, 10);

        Vector3 intermediatePosition = new Vector3(currentPosition.x + (nextPosition.x - currentPosition.x) / (1 + scaleMagnitude), currentPosition.y, currentPosition.z);

        StretchStart(scaleMagnitude, .1f).setEase(LeanTweenType.easeInQuad);
        LeanTween.move(gameObject, intermediatePosition, .1f).setOnComplete(() => {
            currentIndex = nextIndex;
            StretchEnd(scaleMagnitude, .05f).setEase(LeanTweenType.easeOutQuad);
            LeanTween.move(gameObject, nextPosition, .05f);
        });
    }
Example #32
0
    static int get_id(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LTEvent obj = (LTEvent)o;
            int     ret = obj.id;
            LuaDLL.lua_pushinteger(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index id on a nil value" : e.Message));
        }
    }
Example #33
0
    static int get_data(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LTEvent obj = (LTEvent)o;
            object  ret = obj.data;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index data on a nil value" : e.Message));
        }
    }
Example #34
0
    /// <summary>
    /// 点击了观看按钮
    /// </summary>
    /// <param name="evt"></param>
    void OnWatchVideoClicked(LTEvent evt)
    {
        alreadyShowVedio = true;
        //停止倒计时
        //StopCoroutine(VideoCountDown(timeWaitVideo));
        //StopCoroutine();
        if (vedioCountDownCorotuine != null)
        {
            StopCoroutine(vedioCountDownCorotuine);
        }
        ChartboostUtil.Instance.ShowGameOverVideo();
        //移除监听
        LeanTween.removeListener((int)Events.WATCHVIDEOCLICKED, OnWatchVideoClicked);

        LeanTween.addListener((int)Events.VIDEOREWARD, OnVideoRewarded);
        LeanTween.addListener((int)Events.VIDEOCLOSED, OnVideoClosed);
    }
Example #35
0
    static int set_id(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            LTEvent obj  = (LTEvent)o;
            int     arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
            obj.id = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index id on a nil value" : e.Message));
        }
    }
Example #36
0
 void OnGetMedkit(LTEvent evt)
 {
     //if(particle)
     //{
     //    if(particle.isPlaying)
     //    {
     //        particle.Pause();
     //    }
     //    particle.Play();
     //}
     var obj = (GameObject)Instantiate(lifeParticle, gameObject.transform.position, gameObject.transform.rotation);
     if (obj)
     {
         obj.transform.SetParent(gameObject.transform);
         obj.GetComponent<ParticleSystem>().Play(true);
        // Destroy(obj, 2f);
         // Destroy(gameObject);
     }
 }
Example #37
0
 protected virtual void OnEnergyChanged(LTEvent evt)
 {
     int currentEnergy = 0;
     if (evt.data != null)
     {
         currentEnergy = ConvertUtil.ToInt32(evt.data);
     }
     isActive = currentEnergy >= energyCost;
     bool statusChange = false;
     if(useButton.interactable != isActive)
     {
         statusChange = true;
     }
     if (statusChange && isActive && shakeOnEnable)
     {
         iTween.ShakeScale(gameObject, new Vector3(1.2f, 1.2f, 1.2f), 0.5f);
         SoundManager.Instance.PlaySound(SoundManager.SoundType.EnergyItemEnabled);
     }
         
     useButton.interactable = (currentEnergy >= energyCost);
 }
Example #38
0
    void OnDemaged(LTEvent evt)
    {
        if (evt.data != null)
        {
            Demage d = evt.data as Demage;
            if (d != null && hudRoot != null)
            {
                //hudRoot.HideDistance = 1
               
                if (d.isEnemy)
                {
                    if (d.isHeadShot)
                    {
                        if (Random.Range(0, 2) == 1)
                        {
                            hudRoot.NewText("- " + d.demageVal.ToString(), d.tran, headshotHUDColor, 12, 10f, -0.5f, 2.2f, bl_Guidance.RightDown);
                        }
                        else
                        {
                            hudRoot.NewText("- " + d.demageVal.ToString(), d.tran, headshotHUDColor, 12, 10f, -0.5f, 2.2f, bl_Guidance.LeftDown);
                        }
                    }
                    else
                    {
                        if (Random.Range(0, 2) == 1)
                        {
                            hudRoot.NewText("- " + d.demageVal.ToString(), d.tran, normalHUDColor, 12, 10f, -0.5f, 2.2f, bl_Guidance.RightDown);
                        }
                        else
                        {
                            hudRoot.NewText("- " + d.demageVal.ToString(), d.tran, normalHUDColor, 12, 10f, -0.5f, 2.2f, bl_Guidance.LeftDown);
                        }
                    }

                }

            }
        }
    }
Example #39
0
	static int _CreateLTEvent(IntPtr L)
	{
		try
		{
			int count = LuaDLL.lua_gettop(L);

			if (count == 2)
			{
				int arg0 = (int)LuaDLL.luaL_checknumber(L, 1);
				object arg1 = ToLua.ToVarObject(L, 2);
				LTEvent obj = new LTEvent(arg0, arg1);
				ToLua.PushObject(L, obj);
				return 1;
			}
			else
			{
				return LuaDLL.luaL_throw(L, "invalid arguments to ctor method: LTEvent.New");
			}
		}
		catch(Exception e)
		{
			return LuaDLL.toluaL_exception(L, e);
		}
	}
Example #40
0
 /// <summary>
 /// 获得医疗包
 /// </summary>
 /// <param name="evt"></param>
 void OnGetMedKit(LTEvent evt)
 {
     if (evt.data != null)
     {
         float addedValue = 0.0f;
         if (float.TryParse(evt.data.ToString(), out addedValue))
         {
             AddLife(addedValue);
         }
         //SoundManager.Instance.PlaySound(SoundManager.SoundType.GetLife);
     }
 }
Example #41
0
 void OnVideoClosed(LTEvent evt)
 {
     LeanTween.removeListener((int)Events.VIDEOREWARD, OnVideoRewarded);
     LeanTween.removeListener((int)Events.VIDEOCLOSED, OnVideoClosed);
     if (videoRewarded)
     {
         // GameContinue();
         GameReward();
     }
     else
     {
         GameFinish();
     }
 }
Example #42
0
 void eventGeneralCalled( LTEvent e )
 {
     eventGeneralWasCalled = true;
 }
Example #43
0
 /// <summary>
 /// 获得盾牌道具
 /// </summary>
 /// <param name="obj"></param>
 private void OnGetShield(LTEvent evt)
 {
     // throw new NotImplementedException();
     if (evt.data != null)
     {
         float addedVal = 0.0f;
         if (float.TryParse(evt.data.ToString(), out addedVal))
         {
             this.haveShield = true;
             shieldValue += (addedVal / 100) * playerMaxHP;
             qurShieldValue = shieldValue / 4;
             curQurShildValue = qurShieldValue;
             UIManager.Instance.ShowShield();
         }
     }
 }
	void changeColor( LTEvent e ){
		Transform tran = (Transform)e.data;
		float distance = Vector3.Distance( tran.position, transform.position);
		Vector3 to = new Vector3(Random.Range(0f,1f),0f,Random.Range(0f,1f));
		LeanTween.value( gameObject, updateColor, fromColor, to, 0.8f ).setRepeat(2).setLoopPingPong().setDelay(distance*0.05f);
	}
Example #45
0
 void eventGameObjectCalled( LTEvent e )
 {
     eventGameObjectWasCalled = true;
 }
Example #46
0
 void OnEnterEnergyPower(LTEvent evt)
 {
     isExitPower = false;
     StartCoroutine(DecreaseEnergy());
 }
Example #47
0
 /// <summary>
 /// 监听连杀
 /// </summary>
 /// <param name="evt"></param>
 void OnEnemyCombo(LTEvent evt)
 {
     int combo = ConvertUtil.ToInt32(evt.data);
     if (combo >= killingSpreeCombo)
     {
         AddEnergy(killingSpreeEnergy);
         ShowIcon(IconType.Slaughter);
     }
 }
Example #48
0
 public void OnExitEnergyPower(LTEvent evt)
 {
     if (powerWeapon != null)
     {
         powerWeapon.WeaponOut(() =>
          {
              powerWeapon.gameObject.transform.parent.gameObject.SetActive(false);
              currentWeapon.WeaponIn();
              isInEnergyPower = false;
          });
     }
 }
Example #49
0
 void OnNeedBullet(LTEvent evt)
 {
     // if (isActive)
     OnItemUse();
 }
Example #50
0
 /// <summary>
 /// 敌人死亡
 /// </summary>
 /// <param name="evt"></param>
 void OnEmenyDie(LTEvent evt)
 {
     AddAliveEmeny(-1);
 }
Example #51
0
 void OnEnergyItemUsed(LTEvent evt)
 {
     int cost = 0 - ConvertUtil.ToInt32(evt.data);
     AddEnergy(cost);
 }
Example #52
0
 /// <summary>
 /// 监听敌人死亡
 /// </summary>
 /// <param name="evt"></param>
 void OnEnemyDie(LTEvent evt)
 {
     bool isHeadShot = ConvertUtil.ToBool(evt.data);
     if (isHeadShot)
     {
         AddEnergy(headshotEnergy);
         ShowIcon(IconType.HeadShot);
     }
 }
Example #53
0
 /// <summary>
 /// 获得了奖励
 /// </summary>
 /// <param name="evt"></param>
 void OnVideoRewarded(LTEvent evt)
 {
     Debug.Log("Get Rewards!");
     videoRewarded = true;
 }
Example #54
0
 void OnWaveCompleted(LTEvent evt)
 {
     int wave = ConvertUtil.ToInt32(evt.data);
     if (wave > 0)
     {
         AddEnergy(wave);
         ShowIcon(IconType.WaveComplete);
     }
 }
Example #55
0
    /// <summary>
    /// 点击了观看按钮
    /// </summary>
    /// <param name="evt"></param>
    void OnWatchVideoClicked(LTEvent evt)
    {
        alreadyShowVedio = true;
        //停止倒计时
        //StopCoroutine(VideoCountDown(timeWaitVideo));
        //StopCoroutine();
        if (vedioCountDownCorotuine != null)
        {
            StopCoroutine(vedioCountDownCorotuine);
        }
        ChartboostUtil.Instance.ShowGameOverVideo();
        //移除监听
        LeanTween.removeListener((int)Events.WATCHVIDEOCLICKED, OnWatchVideoClicked);

        LeanTween.addListener((int)Events.VIDEOREWARD, OnVideoRewarded);
        LeanTween.addListener((int)Events.VIDEOCLOSED, OnVideoClosed);
    }
Example #56
0
 void OnExitEnergyPower(LTEvent evt)
 {
     isExitPower = true;
 }
Example #57
0
    //换弹夹
    void Reload(LTEvent ent = null)
    {
        if (isReloading)
            return;
        int refillCount = magSize - curMagSize;
        if (curBulltCount < refillCount)
        {
            refillCount = curBulltCount;
        }
        curBulltCount -= refillCount;
        curMagSize += refillCount;
        if (anim)
        {
            isReloading = true;
            anim.SetTrigger("reload");

        }
        else
        {
            UpdateBulletDisplay();
            isReloading = false;
        }
        //isBulltOk = false;
    }
	// ****** Event Listening Methods

	void jumpUp( LTEvent e ){
		GetComponent<Rigidbody>().AddRelativeForce(Vector3.forward * 300f);
	}
Example #59
0
    public void OnEnterEnergyPower(LTEvent evt)
    {
        isInEnergyPower = true;
        currentWeapon.WeaponOut(() =>
        {
            //currentWeapon.gameObject.transform.parent.gameObject.SetActive(false);
            if (powerWeapon != null)
            {
                //powerWeapon.gameObject.transform.position = new Vector3(powerWeapon.gameObject.transform.position.x, -10, powerWeapon.gameObject.transform.position.z);
                powerWeapon.gameObject.transform.parent.gameObject.SetActive(true);
                powerWeapon.WeaponIn();
                //LeanTween.moveLocalY(powerWeapon.gameObject, -3.4f, 1f);
            }

        });
    }
Example #60
0
 /// <summary>
 /// 重新填充
 /// </summary>
 public void Refill(LTEvent evt)
 {
     SoundManager.Instance.PlaySound(SoundManager.SoundType.WeaponEqiuped);
     //curMagSize = magSize;
     curBulltCount += BulletCount;
     UpdateBulletDisplay();
 }