protected override void OnClose()
    {
        if (this.mHPCtrl != null)
        {
            this.mHPCtrl.DeInit();
        }
        if (this.seq_levelup != null)
        {
            TweenExtensions.Kill(this.seq_levelup, false);
        }
        if (this.mExpCtrl != null)
        {
            this.mExpCtrl.DeInit();
        }
        this.mObjPool.Collect <MainUIGoldAddCtrl>();
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Remove(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        this.mActionUpdateCtrl.DeInit();
        GameLogic.SetGameState(GameLogic.EGameState.Over);
        GameLogic.Release.Release();
        if (this.mLevelWaveCtrl != null)
        {
            this.mLevelWaveCtrl.Deinit();
            Object.Destroy(this.mLevelWaveCtrl.gameObject);
        }
    }
Exemple #2
0
    public FindPath()
    {
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        this.InitData();
    }
    private void InitUI()
    {
        this.mAchieveCtrl.Show(false);
        this.mGoldCtrl.gameObject.SetActive(true);
        WindowUI.CloseCurrency();
        if (this.Button_Pause != null)
        {
            this.Button_Pause.gameObject.SetActive(!GameLogic.Hold.Guide.GetNeedGuide());
            this.Button_Pause.onClick = new Action(this.OnClickPause);
        }
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        GameLogic.Hold.Sound.PlayBackgroundMusic(SoundManager.BackgroundMusicType.eBattle);
        CameraControlM.Instance.PlayStartAnimate(null);
        if (this.mExpCtrl != null)
        {
            this.mExpCtrl.Init();
        }
        if (this.mHPCtrl != null)
        {
            this.mHPCtrl.Init();
        }
        this.mActionUpdateCtrl = new ActionUpdateCtrl();
        this.mActionUpdateCtrl.Init(false);
        this.UpdateGold();
        this.ShowBossHP(false);
        this.StartGame();
    }
    protected override void OnInstall()
    {
        base.OnInstall();
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
    }
 protected override void OnInstall()
 {
     if (base.m_SkillData.Args.Length != 2)
     {
         object[] args = new object[] { base.m_SkillData.SkillID, base.m_SkillData.Args.Length };
         SdkManager.Bugly_Report("SkillAlone1084", Utils.FormatString("SkillID:{0} args.length:{1} != 2", args));
     }
     else if (!float.TryParse(base.m_SkillData.Args[0], out this.time))
     {
         object[] args = new object[] { base.m_SkillData.SkillID };
         SdkManager.Bugly_Report("SkillAlone1084", Utils.FormatString("SkillID:{0} args[0] is not a float type.", args));
     }
     else if (string.IsNullOrEmpty(base.m_SkillData.Args[1]))
     {
         object[] args = new object[] { base.m_SkillData.SkillID };
         SdkManager.Bugly_Report("SkillAlone1084", Utils.FormatString("SkillID:{0} args[1] is null.", args));
     }
     else
     {
         this.att            = base.m_SkillData.Args[1];
         this.mAdd           = Goods_goods.GetGoodData(this.att);
         this.mRemove        = Goods_goods.GetGoodData(this.att);
         this.mRemove.value *= -1L;
         ReleaseModeManager mode = GameLogic.Release.Mode;
         mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
     }
 }
    protected override void OnInstall()
    {
        base.m_Entity.OnMonsterDeadAction = (Action <EntityBase>)Delegate.Combine(base.m_Entity.OnMonsterDeadAction, new Action <EntityBase>(this.DeadAction));
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
    }
        public void DeInit()
        {
            this.Clear();
            ReleaseModeManager mode = GameLogic.Release.Mode;

            mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Remove(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        }
    protected override void OnUninstall()
    {
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Remove(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        this.RemoveAttribute();
    }
    protected override void OnDeInitLogic()
    {
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Remove(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        base.OnDeInitLogic();
    }
Exemple #10
0
    protected override void OnStart()
    {
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        this.TargetImage.SetActive(false);
        this.TargetRed.SetActive(false);
    }
    protected override void OnInstall()
    {
        this.level   = int.Parse(base.m_SkillData.Args[0]);
        this.bRemove = false;
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
    }
    protected override void OnUninstall()
    {
        this.mSeqPool.Clear();
        this.update_attribute(false);
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Remove(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
    }
    protected override void OnInstall()
    {
        this.CreateSkillAlone();
        this.ctrl.Init(base.m_Entity, this);
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom             = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        base.m_Entity.Event_PositionBy += new Action <Vector3>(this.OnPositionBy);
    }
Exemple #14
0
    protected override void OnDestroys()
    {
        base.OnDestroys();
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Remove(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        if (this.TargetImage != null)
        {
            Object.Destroy(this.TargetImage);
        }
    }
Exemple #15
0
    public void Release()
    {
        Time.timeScale = 1f;
        this.Bullet.Release();
        this.PlayerBullet.Release();
        this.Effect.Release();
        this.Form.Release();
        this.GoodsCreate.Release();
        if (this._Path != null)
        {
            this._Path.DeInit();
        }
        this.Game.Release();
        this.EntityCache.Release();
        this.Entity.DeInit();
        this.Mode.DeInit();
        this.MapEffect.Release();
        LocalModelManager.Instance.Drop_Drop.ClearGoldDrop();
        CInstance <TipsManager> .Instance.Clear();

        Updater.GetUpdater().OnRelease();
        Updater.UpdaterDeinit();
        Goods1151.DoorData.DeInit();
        Object.DestroyImmediate(GameNode.m_Battle);
        GameNode.MapCacheNode.DestroyChildren();
        GameLogic.Hold.Sound.DeInit();
        if (this._MapCreator != null)
        {
            this._MapCreator.Deinit();
        }
        if (this._Entity != null)
        {
            Object.DestroyImmediate(this._Entity.gameObject);
            this._Entity = null;
        }
        TimerBase <Timer> .Unregister();

        TimeClock.Clear();
        GameNode.m_HP.DestroyChildren();
        this._Game         = null;
        this._Bullet       = null;
        this._PlayerBullet = null;
        this._Effect       = null;
        this._MapEffect    = null;
        this._EntityCache  = null;
        this._MapCreator   = null;
        this._Path         = null;
        this._GoodsCreate  = null;
        this._Mode         = null;
        this._Form         = null;
        Goods1151.DoorData = null;
        GC.Collect();
    }
    protected override void OnInit()
    {
        base.OnInit();
        base.m_MoveCtrl   = new MoveControl();
        base.m_AttackCtrl = new AttackControl();
        base.m_MoveCtrl.Init(this);
        base.m_AttackCtrl.Init(this);
        GameLogic.Release.Entity.SetPartBody(this);
        base.m_EntityData.Modify_Invincible(true);
        this.SetCollider(false);
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
    }
    protected override void OnUninstall()
    {
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom             = (Action <RoomGenerateBase.Room>)Delegate.Remove(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        base.m_Entity.Event_PositionBy -= new Action <Vector3>(this.OnPositionBy);
        this.ctrl.DeInit();
        this.mAutoDespawn = this.good.GetComponent <AutoDespawn>();
        if (this.mAutoDespawn == null)
        {
            this.mAutoDespawn = this.good.AddComponent <AutoDespawn>();
        }
        this.mAutoDespawn.SetDespawnTime(5f);
        this.mAutoDespawn.enabled = true;
        this.KillSequence();
    }
    protected override void OnDeInitLogic()
    {
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Remove(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        if (this.OnRemoveEvent != null)
        {
            this.OnRemoveEvent(base.m_Data.CharID);
            this.OnRemoveEvent = null;
        }
        if (!this.bGotoRoomRemove)
        {
            GameLogic.PlayEffect(0x2f4d68, base.position);
        }
        base.OnDeInitLogic();
    }
    protected override void OnInit()
    {
        base.OnInit();
        this.m_BabyData = LocalModelManager.Instance.Character_Baby.GetBeanById(this.ClassID.ToString());
        base.m_MoveCtrl = new MoveControl();
        this.InitAttackControl();
        base.m_MoveCtrl.Init(this);
        base.m_AttackCtrl.Init(this);
        GameLogic.Release.Entity.SetBaby(this);
        this.UpdateAttributes();
        bool babyResistBullet = base.m_Parent.m_EntityData.GetBabyResistBullet();

        this.SetCollider(babyResistBullet);
        base.ShowHP(false);
        base.RemoveColliders();
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
    }
        public Door1151()
        {
            ReleaseModeManager mode = GameLogic.Release.Mode;

            mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        }