コード例 #1
0
        /// <summary>
        /// 释放技能
        /// </summary>
        /// <param name="skillId"></param>
        public void ReleaseSkill(int skillid)
        {
            SkillID       = skillid;
            IsWeaponSkill = IsWeapon(SkillID);

            SkillData skillData = m_CfgEternityProxy.GetSkillData(SkillID);

            m_Context.AddObject <SkillData>(skillData);

            Leyoutech.Utility.DebugUtility.LogWarning("技能", string.Format("OnStateMachineComplete->执行释放技能  ------>  Entity = {0} , 主角 = {1},技能类型 = {2} ,{3}, 技能ID ={4}, IsTrigger = {5} ",
                                                                          m_ISpacecraftSkillProperty.EntityId(),
                                                                          m_ISpacecraftSkillProperty.IsMain(),
                                                                          skillData.BaseData.Value.CategoryType,
                                                                          IsWeaponSkill ? "武器技能" : "飞船技能",
                                                                          SkillID,
                                                                          skillData.BaseData.Value.IsTrigger
                                                                          ));

            PrepareRunningData(SkillID);

            if (m_ISpacecraftSkillProperty.IsMain())
            {
                SkillRPCNet skillRPC = new SkillRPCNet(RpcCloseAction);
                m_Context.AddObject <SkillRPCNet>(skillRPC);
            }

            m_StageType = SkillStageType.Begin;
            m_StateMachine.SetInitialState(SkillStateToken.Begin);

            //进度条隐藏显示
            ShowProgressBar(true);
        }
コード例 #2
0
        public override void OnInitialize(IFlyerProperty property)
        {
            m_FlyerProprety    = property;
            m_CfgEternityProxy = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;
            m_Context          = new DefaultContext();

            m_Context.AddObject(this, true);
            m_Context.AddObject(typeof(IBulletTargetProperty), property, true);
            m_Context.AddObject(typeof(IActionFactory), TimelineActionFactory.Factory, true);
            m_Context.AddObject(typeof(IBaseActionProperty), property, true);
            m_Context.AddObject(typeof(IMoveActionProperty), property, true);

            ContextAddOtherObject();

            m_StateMachine = new FlyerStateMachine(m_Context);
            m_StateMachine.CompletedHandler += OnStateMachineComplete;

            m_StageType = FlyerStageType.Flying;
            m_StateMachine.SetInitialState(FlyerStateToken.Flying);
        }
コード例 #3
0
        public override void OnInitialize(ISpacecraftSkillProperty property)
        {
            m_ISpacecraftSkillProperty = property;
            m_CfgEternityProxy         = GameFacade.Instance.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy;
            m_PlayerSkillProxy         = GameFacade.Instance.RetrieveProxy(ProxyName.PlayerSkillProxy) as PlayerSkillProxy;

            m_Context     = new DefaultContext();
            m_RunningData = new SkillRunningData();

            m_Context.AddObject(this, true);
            m_Context.AddObject(typeof(IActionFactory), TimelineActionFactory.Factory, true);
            m_Context.AddObject(m_RunningData, true);
            m_Context.AddObject(typeof(IBaseActionProperty), property, true);
            m_Context.AddObject(typeof(IBindNodeActionProperty), property, true);

            ContextAddOtherObject();

            m_StateMachine = new SkillStateMachine(m_Context);
            m_StateMachine.CompletedHandler += OnStateMachineComplete;
            m_StateMachine.ChangedHandler   += OnStateMachineChanged;
        }
コード例 #4
0
        /// <summary>
        /// 其他上下文需要携带的数据
        /// </summary>
        private void ContextAddOtherObject()
        {
            FlyerData flyerData = m_CfgEternityProxy.GetFlyerData(m_FlyerProprety.GetFlyerDataId());

            m_Context.AddObject <FlyerData>(flyerData);
        }