示例#1
0
        public static WRAction Create_GameOver()
        {
            WRAction action = new WRAction();

            action.actionType = WRActionType.GameOver;
            action.gameOver   = new WRAction_GameOver();
            return(action);
        }
示例#2
0
        public static WRAction Create_Skill(C_SyncSkill_0x822 c)
        {
            WRAction action = new WRAction();

            action.actionType = WRActionType.Skill;
            action.skill      = new WRAction_Skill(c);
            return(action);
        }
示例#3
0
        public static WRAction Create_Prop(List <ProtoFightUnitInfo> unitPropList)
        {
            WRAction action = new WRAction();

            action.actionType = WRActionType.Prop;
            action.prop       = new WRAction_Prop(unitPropList);
            return(action);
        }
示例#4
0
        public static WRAction Create_TurretAtk(int buildUid, int soliderUid)
        {
            WRAction action = new WRAction();

            action.actionType = WRActionType.TurretAtk;
            action.turretAtk  = new WRAction_TurretAtk(buildUid, soliderUid);
            return(action);
        }
示例#5
0
        public static WRAction Create_SetProductionSkill(int legionId, int skillUid, float speed)
        {
            WRAction action = new WRAction();

            action.actionType      = WRActionType.SetProductionSkill;
            action.productionSkill = new WRAction_SetProductionSkill(legionId, skillUid, speed);
            return(action);
        }
示例#6
0
        public static WRAction Create_BuildLegionChange(int uid, int legionId)
        {
            WRAction action = new WRAction();

            action.actionType        = WRActionType.BuildLegionChange;
            action.buildLegionChange = new WRAction_BuildLegionChange(uid, legionId);
            return(action);
        }
示例#7
0
        public static WRAction Create_HeroBackstage(int heroUid, int targetLegionId)
        {
            WRAction action = new WRAction();

            action.actionType    = WRActionType.HeroBackstage;
            action.heroBackstage = new WRAction_HeroBackstage(heroUid, targetLegionId);
            return(action);
        }
示例#8
0
        public static WRAction Create_Uplevel(int uid, int level, float time)
        {
            WRAction action = new WRAction();

            action.actionType = WRActionType.Uplevel;
            action.uplevel    = new WRAction_Uplevel(uid, level, time);
            return(action);
        }
示例#9
0
        public static WRAction Create_SendArm(int fromUid, int toUid, int count, int beginUid)
        {
            WRAction action = new WRAction();

            action.actionType = WRActionType.SendArm;
            action.sendArm    = new WRAction_SendArm(fromUid, toUid, count, beginUid);
            return(action);
        }
示例#10
0
        public void AddAction(WRAction action)
        {
            action.t = War.time;
            queue.Add(action);

            if (action.actionType == WRActionType.Skill)
            {
                action.t -= 0.5f;
                if (action.t < 0)
                {
                    action.t = 0f;
                }
            }
//			Debug.LogFormat ("action.t={0} , War.time={1}", action.t, War.time);
        }
示例#11
0
        void CheckAction()
        {
            if (War.time > action.t)
            {
                action.Exe();
                action = null;

                if (index < count)
                {
                    action = timeLineData.queue [index];
                    index++;

                    CheckAction();
                }
            }
        }
示例#12
0
        void Init()
        {
            Debug.Log("WRTimeLine.Init");
            if (!War.isRecord)
            {
                this.enabled = false;
            }
            else
            {
                Debug.Log(" War.timeLineData=" + War.timeLineData);
                timeLineData = War.timeLineData;
                count        = timeLineData.queue.Count;

                if (index < count)
                {
                    action = timeLineData.queue[index];
                    index++;
                }
            }
        }