TWI587897B - Method and system for controlling status of unit of service platform - Google Patents

Method and system for controlling status of unit of service platform Download PDF

Info

Publication number
TWI587897B
TWI587897B TW102134018A TW102134018A TWI587897B TW I587897 B TWI587897 B TW I587897B TW 102134018 A TW102134018 A TW 102134018A TW 102134018 A TW102134018 A TW 102134018A TW I587897 B TWI587897 B TW I587897B
Authority
TW
Taiwan
Prior art keywords
state
unit
layer
destination
determining
Prior art date
Application number
TW102134018A
Other languages
Chinese (zh)
Other versions
TW201416117A (en
Inventor
董航
Original Assignee
騰訊科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 騰訊科技(深圳)有限公司 filed Critical 騰訊科技(深圳)有限公司
Publication of TW201416117A publication Critical patent/TW201416117A/en
Application granted granted Critical
Publication of TWI587897B publication Critical patent/TWI587897B/en

Links

Landscapes

  • Stored Programmes (AREA)

Description

種業務平台中單位狀態控制的方法及系統 Method and system for unit state control in a service platform

本發明涉及遊戲技術領域,尤其涉及一種業務平台中單位狀態控制的方法及系統。 The present invention relates to the field of game technologies, and in particular, to a method and system for unit state control in a service platform.

在現有大中型遊戲中,通常採用單一的狀態機技術控制遊戲單位的狀況。隨著遊戲中的單位越來越多,單位的狀態及功能也越來越複雜,若仍然採用單一的狀態機技術對遊戲中單位的多狀態及多功能進行控制,則會導致遊戲系統的程式複雜且混亂,從而影響遊戲的穩定性。 In existing large and medium-sized games, a single state machine technology is usually used to control the condition of the game unit. As more and more units in the game, the status and functions of the unit become more and more complicated. If a single state machine technology is still used to control the multi-state and multi-function of the unit in the game, the program of the game system will be caused. Complex and confusing, which affects the stability of the game.

本發明實施例提供了一種業務平台中單位狀態控制的方法及系統,以對遊戲中單位的狀態及功能進行控制,從而簡化遊戲系統的程式,提高遊戲的穩定性。 Embodiments of the present invention provide a method and system for unit state control in a service platform to control the state and function of a unit in a game, thereby simplifying the program of the game system and improving the stability of the game.

本發明第一方面提供了一種業務平台中單位狀態控制的方法,用於控制所述單位表現目的狀態,其特徵在於,包括:提供外部介面,以接收輸入的狀態控制指令;根據接收到的狀態控制指令生成相應的狀態參數;判定所述單位是否滿足第一預設條件;若所述單位滿足第一預設條件,則根據所述狀態參數來確定目的狀態 所屬的狀態層;根據所述狀態參數判定所述目的狀態是否滿足所確定的狀態層的第二預設條件;及若所述目的狀態滿足所確定的狀態層的第二預設條件,則控制所述單位表現所述目的狀態。 A first aspect of the present invention provides a method for unit state control in a service platform, configured to control the unit performance destination state, and the method includes: providing an external interface to receive an input state control instruction; and receiving the state according to the received state The control instruction generates a corresponding state parameter; determines whether the unit satisfies the first preset condition; and if the unit satisfies the first preset condition, determines the target state according to the state parameter a state layer; determining, according to the state parameter, whether the target state satisfies a second preset condition of the determined state layer; and if the target state satisfies a second preset condition of the determined state layer, then controlling The unit represents the target state.

本發明第二方面提供了一種業務平台中單位狀態控制的系統,用於控制所述單位表示目的狀態,所述系統包括:外部介面單元,用於提供外部介面,以接收輸入的狀態控制指令,並根據接收到的狀態控制指令生成相應的狀態參數;判定單元,用於判定所述單位是否滿足第一預設條件;若所述單位滿足第一預設條件,則根據所述狀態參數來確定所述目的狀態所屬的狀態層;還用於根據所述狀態參數判定所述目的狀態是否滿足所確定的狀態層的第二預設條件;及控制單元,用於當所述目的狀態滿足所確定的狀態層的第二預設條件時,控制所述單位表現所述目的狀態。 A second aspect of the present invention provides a system for unit state control in a service platform for controlling the unit to indicate a destination state, the system comprising: an external interface unit for providing an external interface to receive an input state control command, And generating a corresponding state parameter according to the received state control instruction; the determining unit is configured to determine whether the unit meets the first preset condition; and if the unit meets the first preset condition, determine according to the state parameter a state layer to which the destination state belongs; further configured to determine, according to the state parameter, whether the target state meets a second preset condition of the determined state layer; and a control unit, configured to: when the target state meets the determined The second predetermined condition of the state layer controls the unit to represent the destination state.

本發明實施例通過提供外部介面,以接收輸入的狀態控制指令;根據接收到的狀態控制指令生成相應的狀態參數;判定所述單位是否滿足第一預設條件;若所述單位滿足第一預設條件,則根據所述狀態參數來確定目的狀態所屬的狀態層;根據所述狀態參數判定所述目的狀態是否滿足所確定的狀態層的第二預設條件;及若所述目的狀態滿足所確定的狀態層的第二預設條件,則控制所述單位表現所述目的狀態,從而實現了對遊戲中單位的狀態及功能的控制。本發明採用上述方法實現對遊戲單位的狀態及功能的控制,簡化了遊戲程式,從而提高了遊戲的穩定性。 The embodiment of the present invention receives an input state control command by providing an external interface; generates a corresponding state parameter according to the received state control command; determines whether the unit satisfies the first preset condition; and if the unit satisfies the first pre-condition Setting a condition, determining, according to the state parameter, a state layer to which the target state belongs; determining, according to the state parameter, whether the target state satisfies a second preset condition of the determined state layer; and if the target state satisfies The second preset condition of the determined state layer controls the unit to represent the target state, thereby achieving control of the state and function of the unit in the game. The invention adopts the above method to realize the control of the state and function of the game unit, and simplifies the game program, thereby improving the stability of the game.

S101、S102、S103、S104、S105、S106、S107、S108‧‧‧步驟 Steps S101, S102, S103, S104, S105, S106, S107, S108‧‧

S201、S202、S203、S204、S205、S206、S207、S208、S209、S210、S211、S212、S213、S214、S215‧‧‧步驟 S201, S202, S203, S204, S205, S206, S207, S208, S209, S210, S211, S212, S213, S214, S215‧‧ steps

101‧‧‧外部介面單元 101‧‧‧External interface unit

102‧‧‧判定單元 102‧‧‧Decision unit

103‧‧‧控制單元 103‧‧‧Control unit

104‧‧‧記錄單元 104‧‧‧recording unit

105‧‧‧存儲單元 105‧‧‧storage unit

106‧‧‧進入介面單元 106‧‧‧Enter interface unit

107‧‧‧退出介面單元 107‧‧‧ Exit interface unit

108‧‧‧修改單元 108‧‧‧Modification unit

109‧‧‧發送單元 109‧‧‧Send unit

110‧‧‧狀態鎖單元 110‧‧‧State lock unit

為了更清楚地說明本發明實施例或現有技術中的技術方 案,下面將對實施例或現有技術描述中所需要使用的附圖作簡單地介紹,顯而易見地,下面描述中的附圖僅僅是本發明的一些實施例,對於本領域普通技術人員來講,在不付出創造性勞動的前提下,還可以根據這些附圖獲得其他的附圖。 In order to more clearly illustrate the embodiments of the present invention or the prior art BRIEF DESCRIPTION OF THE DRAWINGS The accompanying drawings, which are set forth in the accompanying drawings Other drawings may also be obtained from these drawings without paying for creative labor.

圖1為本發明第一較佳實施例提供的一種業務平台中單位狀態控制的方法的流程圖;圖2A-2B為本發明第二較佳實施例提供的一種業務平台中單位狀態控制的方法的流程圖;圖3為本發明第一較佳實施例提供的一種業務平台中單位狀態控制的系統的結構示意圖;圖4為本發明第二較佳實施例提供的一種業務平台中單位狀態控制的系統的結構示意圖。 1 is a flowchart of a method for unit state control in a service platform according to a first preferred embodiment of the present invention; FIG. 2A-2B is a method for controlling unit state in a service platform according to a second preferred embodiment of the present invention; FIG. 3 is a schematic structural diagram of a system for unit state control in a service platform according to a first preferred embodiment of the present invention; FIG. 4 is a diagram showing unit state control in a service platform according to a second preferred embodiment of the present invention; Schematic diagram of the system.

下面將結合本發明實施例中的附圖,對本發明實施例中的技術方案進行清楚、完整地描述,顯然,所描述的實施例僅僅是本發明一部分實施例,而不是全部的實施例。基於本發明中的實施例,本領域普通技術人員在沒有作出創造性勞動前提下所獲得的所有其他實施例,都屬於本發明保護的範圍。 The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.

下面將結合附圖1,對本發明實施例提供的一種業務平台中單位狀態控制的方法進行詳細介紹。 A method for controlling unit state in a service platform according to an embodiment of the present invention will be described in detail below with reference to FIG.

請參見圖1,為本發明第一較佳實施例提供的一種業務平台中單位狀態控制的方法的流程圖;該方法用於控制所述單位表現目的狀態。在本實施方式中,所述業務平台為遊戲。該方法可以包括以下步驟S101-步驟S108。 1 is a flowchart of a method for unit state control in a service platform according to a first preferred embodiment of the present invention; the method is used to control a state of a target performance of the unit. In this embodiment, the service platform is a game. The method may include the following steps S101 to S108.

S101,提供外部介面,以接收外部邏輯模組調用所述外部介面而輸入的狀態控制指令。例如,要使所述單位表現出目的狀態如跑時,則外部邏輯模組需要輸入狀態控制指令來控制所述單位表現所述目的狀態。 S101. An external interface is provided to receive a state control instruction that is input by the external logic module to invoke the external interface. For example, to cause the unit to exhibit a destination state such as running, the external logic module needs to input a state control command to control the unit to represent the destination state.

S102,根據接收到的狀態控制指令生成相應的狀態參數。其中,所述狀態參數中包括所述目的狀態對應的參數,從而根據所述狀態參數即可得知需要使單位表現出的狀態為所述目的狀態。 S102. Generate a corresponding state parameter according to the received state control instruction. The state parameter includes a parameter corresponding to the target state, so that the state that needs to be expressed by the unit is known to be the target state according to the state parameter.

S103,判定所述單位是否滿足第一預設條件。當所述單位滿足所述第一預設條件時,則執行步驟S104。當所述單位不滿足所述第一預設條件時,則執行步驟S107。其中,所述第一預設條件包括單位的類型條件及單位的生命條件。該步驟可以包括:判定所述單位的類型是否為支援狀態轉換控制的類型。例如,當所述單位的類型為靜止的物體,如樹木等,則所述單位的類型不支援狀態轉換控制的類型,即所述單位的類型不滿足所述類型條件。當所述單位的類型為動態的生命體,如人等,則所述單位的類型支援狀態轉換控制的類型,即所述單位的類型滿足所述類型條件。 S103. Determine whether the unit satisfies a first preset condition. When the unit satisfies the first preset condition, step S104 is performed. When the unit does not satisfy the first preset condition, step S107 is performed. The first preset condition includes a unit type condition and a unit life condition. The step may include determining whether the type of the unit is of a type that supports state transition control. For example, when the type of the unit is a stationary object such as a tree or the like, the type of the unit does not support the type of state transition control, that is, the type of the unit does not satisfy the type condition. When the type of the unit is a dynamic living body, such as a person or the like, the type of the unit supports the type of state transition control, that is, the type of the unit satisfies the type condition.

判定所述單位是否具有生命條件。當所述單位是活著的,可以執行狀態功能來反應出相應的動畫效果,則表明所述單位具有生命條件,滿足所述生命條件。當所述單位是處於死亡狀態,不再能執行狀態功能,從而不能反應出相應的動畫效果,則表明所述單位不具有生命條件,不滿足所述生命條件。故,通過判定所述單位是否可以執行狀態功能以反應相應的動畫效果來判定所述單位是否具有生命條件。當所述單位的類型滿足所述類型條件且所述單位滿足生命條件時,則判定所述單位滿足所述第一預設條件。 It is determined whether the unit has a living condition. When the unit is alive, a status function can be performed to reflect the corresponding animation effect, indicating that the unit has a living condition that satisfies the life condition. When the unit is in a dead state and can no longer perform the state function, thereby failing to reflect the corresponding animation effect, it indicates that the unit does not have a living condition and does not satisfy the life condition. Therefore, it is determined whether the unit has a living condition by determining whether the unit can perform a status function to reflect a corresponding animation effect. When the type of the unit satisfies the type condition and the unit satisfies the life condition, it is determined that the unit satisfies the first preset condition.

S104,根據所述狀態參數來確定目的狀態所屬的狀態層。其中,根據遊戲中的單位所具有的功能,抽象出所述單位所具有的可能的 全部狀態。全部狀態包括行走狀態(如走、跑、站立、坐等)、動作狀態(如攻擊、施法、死亡等)及被動狀態(如被限制移動、被限制施法、被限制攻擊等)。根據狀態之間互斥的原則對全部狀態進行分層。所謂互斥的原則即為互斥的狀態(不能同時存在的狀態,例如,單位不能同時處於走狀態及跑狀態)被分為同一層上,非互斥的狀態(可以同時存在的狀態,例如,單位在跑的同時也可以處於攻擊狀態)在不同層。故,在本實施方式中,將全部狀態分為第一狀態層如行走狀態層、第二狀態層如動作狀態層及第三狀態層如被動狀態層。其中,所述動作狀態層及所述行走狀態層屬於主動狀態層。所述行走狀態層包括全部行走狀態。所述動作狀態層包括全部動作狀態。所述被動狀態層包括全部被動狀態。因此,根據所述狀態參數得知所述目的狀態是哪種狀態,所述目的狀態所在的狀態層即為確定的狀態層。 S104. Determine, according to the state parameter, a state layer to which the destination state belongs. Among them, according to the functions of the units in the game, abstract the possible All status. All states include walking status (such as walking, running, standing, sitting, etc.), action status (such as attack, cast, death, etc.) and passive status (such as restricted movement, restricted casting, restricted attack, etc.). All states are layered according to the principle of mutual exclusion between states. The principle of mutual exclusion is a mutually exclusive state (a state that cannot exist at the same time, for example, a unit cannot be in a walking state and a running state at the same time) is divided into two layers, non-mutually exclusive states (states that can exist simultaneously, for example The unit can also be in an attack state while running. At different levels. Therefore, in the present embodiment, all states are divided into a first state layer such as a walking state layer, a second state layer such as an action state layer, and a third state layer such as a passive state layer. The action state layer and the walk state layer belong to an active state layer. The walking state layer includes all walking states. The action state layer includes all action states. The passive state layer includes all passive states. Therefore, according to the state parameter, it is known which state the destination state is, and the state layer in which the destination state is located is the determined state layer.

所述步驟S104還可以包括:若所述單位滿足第一預設條件,則根據所述狀態參數來確定所述目的狀態是否屬於所述第一及第二狀態層中的狀態。 The step S104 may further include: determining, according to the state parameter, whether the target state belongs to a state in the first and second state layers, if the unit satisfies a first preset condition.

若所述目的狀態屬於所述第一及第二狀態層中的狀態,則根據所述狀態參數確定所述目的狀態所屬第一及第二狀態層中的哪一狀態層。 If the destination state belongs to a state in the first and second state layers, determining which one of the first and second state layers belongs to the destination state according to the state parameter.

在其他實施方式中,所述單位的全部狀態的狀態層數量可以根據實際的狀態類型進行調整,並不限於上述的三種狀態層。 In other embodiments, the number of state layers of all states of the unit may be adjusted according to actual state types, and is not limited to the above three state layers.

S105,根據所述狀態參數判定所述目的狀態是否滿足所確定的狀態層的第二預設條件。當所述目的狀態滿足所確定的狀態層的第二預設條件時,執行步驟S106。當所述目的狀態不滿足所確定的狀態層的第二預設條件時,執行步驟S108。 S105. Determine, according to the state parameter, whether the target state meets a second preset condition of the determined state layer. When the target state satisfies the second preset condition of the determined state layer, step S106 is performed. When the target state does not satisfy the second preset condition of the determined state layer, step S108 is performed.

具體地,所述第二預設條件包括可轉換狀態條件及非鎖定條件。根據所述狀態參數判定所確定的狀態層的狀態轉換清單是否存儲有所述目的狀態以判定是否滿足所述可轉換狀態條件,並判定所述目的狀態是 否被鎖定以判定是否滿足所述非鎖定條件。當確定的狀態層的狀態轉換清單存儲有所述目的狀態且所述目的狀態未被鎖定時,表明所述目的狀態滿足所確定的狀態層的第二預設條件。 Specifically, the second preset condition includes a convertible state condition and a non-locking condition. Determining, according to the state parameter, whether the state transition list of the determined state layer stores the destination state to determine whether the switchable state condition is satisfied, and determining that the destination state is No is locked to determine if the non-locking condition is met. When the state transition list of the determined state layer stores the destination state and the destination state is not locked, indicating that the destination state satisfies the second preset condition of the determined state layer.

其中,每一狀態層均存儲有狀態轉換清單。每一狀態轉換清單存儲有當前所述單位在此狀態層可以轉換為的其他狀態資訊。根據所述狀態參數判定所述確定的狀態層的狀態轉換清單中的其他狀態資訊是否有所述目的狀態。 Among them, each state layer stores a state transition list. Each state transition list stores other state information that the current unit can convert to at this state layer. Determining, according to the state parameter, whether other state information in the state transition list of the determined state layer has the destination state.

根據遊戲的具體要求,所述動作狀態層與所述行走狀態層之間可以設置優先順序。在本實施方式中,設定所述動作狀態層的優先順序高於所述行走狀態層,從而所述動作狀態層的狀態可以禁止所述行走狀態層的狀態轉換。例如,當所述單位處於死亡狀態時,所述單位則不能再表現走或跑的狀態等,以符合實際邏輯需求。 According to the specific requirements of the game, a priority order may be set between the action state layer and the walk state layer. In the present embodiment, the priority order of the operation state layer is set to be higher than the walking state layer, so that the state of the action state layer can prohibit state transition of the walking state layer. For example, when the unit is in a state of death, the unit can no longer express the state of walking or running, etc., in order to meet the actual logic requirements.

判定所述目的狀態是否被鎖定可以包括:判定是否接收到了確定所述目的狀態所在的狀態層的優先順序低於主動狀態層中的另一狀態層優先順序的優先順序指令,及所述單位當前的狀態中是否有屬於所述另一狀態層中的狀態。 Determining whether the destination state is locked may include: determining whether a priority order instruction that determines that a priority order of a state layer in which the destination state is located is lower than another state layer priority order in an active state layer, and the unit current is received Whether there is a state belonging to the other state layer in the state.

當判定接收到了優先順序指令,且所述單位當前的狀態中有屬於所述另一狀態層的狀態時,則表明所述目的狀態被鎖定,發送鎖定指令;當判定未接收到優先順序指令,則表明所述目的狀態未被鎖定。例如,所述單位處於躺著並死亡的狀態,死亡狀態所在的狀態層的優先順序被確定高於躺著狀態所在的狀態層的優先順序,若所述目的狀態為走時,則表明所述走的狀態被鎖定。 When it is determined that the priority order instruction is received, and the current state of the unit has a state belonging to the another state layer, it indicates that the destination state is locked, and a lock instruction is sent; when it is determined that the priority order command is not received, It indicates that the destination state is not locked. For example, the unit is in a state of lying down and dying, the priority order of the state layer in which the death state is located is determined to be higher than the priority order of the state layer in which the lying state is located, and if the destination state is walking, it indicates The state of walking is locked.

根據鎖定指令鎖定所述目的狀態所在的狀態層,以禁止所述單位表現所述目的狀態。 The state layer in which the destination state is located is locked according to a lock instruction to prohibit the unit from expressing the destination state.

S106,控制所述單位表現所述目的狀態。其中,每一狀態均對應一個進入介面及一個退出介面。所述進入介面用於使所述單位進入 相應的狀態,完成相應的功能並呈現相應的動畫效果。所述退出介面用於使所述單位退出相應的狀態,完成退出相應的功能。所述單位通過所述目的狀態所在狀態層的當前狀態的退出介面退出該狀態層的當前狀態,並通過所述目的狀態的進入介面進入所述目的狀態,從而控制所述單位表現所述目的狀態。而與所述目的狀態不同狀態層的當前狀態繼續維持其狀態。例如,所述單位目前的狀態處於走並進行攻擊。所述目的狀態為跑。其中跑的狀態與走的狀態為同一狀態層。攻擊的狀態與走及跑的狀態不為同一狀態層。要使所述單位表現跑的狀態。則需要通過走狀態的退出介面退出走狀態,並通過跑狀態的進入介面進入跑狀態。所述攻擊狀態繼續維持。此時,所述單位表示跑並進行攻擊,從而實現了控制所述單位表示跑的狀態。 S106. Control the unit to represent the target state. Each state corresponds to an entry interface and an exit interface. The entry interface is used to enter the unit The corresponding state completes the corresponding function and renders the corresponding animation effect. The exit interface is used to cause the unit to exit the corresponding state and complete the exit of the corresponding function. The unit exits the current state of the state layer by using an exit interface of a current state of the state layer in which the destination state is located, and enters the target state through an entry interface of the target state, thereby controlling the unit to represent the target state. . The current state of the state layer, unlike the target state, continues to maintain its state. For example, the current state of the unit is going and attacking. The target state is running. The running state and the walking state are the same state layer. The state of the attack is not in the same state layer as the state of walking and running. To make the unit show the state of running. Then, it is necessary to exit the state through the exit interface of the state, and enter the running state through the entry interface of the running state. The attack state continues to be maintained. At this time, the unit indicates running and attacking, thereby realizing the state in which the unit is controlled to run.

初始時,每一狀態層的狀態轉換清單的狀態均為預設狀態。當所述單位退出與目的狀態同一狀態層的當前狀態,且進入所述目的狀態時,將該狀態層的狀態轉換清單中的狀態修改為所述目的狀態可轉換的其他狀態,並存儲修改後的狀態轉換清單。當所述單位退出所述目的狀態時,將該狀態層的狀態轉換清單中的狀態恢復為預設狀態。 Initially, the state of the state transition list for each state layer is the preset state. When the unit exits the current state of the same state layer as the destination state, and enters the destination state, the state in the state transition list of the state layer is modified to other states that the destination state can be converted, and the modified state is stored. A list of state transitions. When the unit exits the destination state, the state in the state transition list of the state layer is restored to a preset state.

S107,發送第一指令以表明狀態表現失敗的第一原因。S108,發送第二指令以表明狀態表現失敗的第二原因。在其他實施方式中,若無需明確切換失敗的原因是,則所述步驟S107及S108可以省略。 S107. Send a first instruction to indicate the first reason that the status performance fails. S108. Send a second instruction to indicate a second cause of failure of the status performance. In other embodiments, if it is not necessary to clarify the reason for the handover failure, the steps S107 and S108 may be omitted.

在本較佳實施方式中,本發明通過提供外部介面,以接收外部邏輯模組調用所述外部介面而輸入的狀態控制指令;根據接收到的狀態控制指令生成相應的狀態參數;判定所述單位是否滿足第一預設條件;若所述單位滿足第一預設條件,則根據所述狀態參數來確定目的狀態所屬的狀態層;根據所述狀態參數判定所述目的狀態是否滿足所確定的狀態層的第二預設條件;及若所述目的狀態滿足所確定的狀態層的第二預設條件時,則控制所述單位表現所述目的狀態。本發明實現了對遊戲中單位的狀 態及功能的控制,從而簡化了遊戲程式,提高了遊戲的穩定性。 In the preferred embodiment, the present invention provides a state control command input by the external logic module to call the external interface by providing an external interface; generating a corresponding state parameter according to the received state control command; determining the unit Whether the first preset condition is met; if the unit satisfies the first preset condition, determining a state layer to which the target state belongs according to the state parameter; determining, according to the state parameter, whether the target state satisfies the determined state a second preset condition of the layer; and if the target state satisfies the second preset condition of the determined state layer, controlling the unit to represent the target state. The invention realizes the shape of the unit in the game State and function control, which simplifies the game program and improves the stability of the game.

請參見圖2,為本發明第二較佳實施例提供的一種業務平台中單位狀態控制的方法的流程圖;在本實施方式中,所述業務平台為遊戲。該方法還包括以下步驟S201-步驟S215。 2 is a flowchart of a method for unit state control in a service platform according to a second preferred embodiment of the present invention; in this embodiment, the service platform is a game. The method further includes the following steps S201 to S215.

S201,記錄對所述單位的狀態進行分層後的第一狀態層、第二狀態層及第三狀態層,及第一至第三狀態層中的狀態。其中所述第一狀態層的狀態為互斥狀態,所述第二狀態層的狀態與第一狀態層的狀態為非互斥狀態,所述第三狀態層的狀態為非互斥狀態,且與所述第一及第二狀態層的狀態為非互斥狀態。 S201. Record the states of the first state layer, the second state layer, and the third state layer, and the first to third state layers, which are layered in the state of the unit. The state of the first state layer is a mutually exclusive state, the state of the second state layer is a non-exclusive state, and the state of the third state layer is a non-exclusive state, and The states of the first and second state layers are non-exclusive.

其中,根據遊戲中的單位所具有的功能,抽象出所述單位所具有的可能的全部狀態。全部狀態包括行走狀態(如走、跑、站立、坐等)、動作狀態(如攻擊、施法、死亡等)及被動狀態(如被限制移動、被限制施法、被限制攻擊等)。根據狀態之間互斥的原則對全部狀態進行分層。所謂互斥的原則即為互斥的狀態(不能同時存在的狀態,例如,單位不能同時處於走狀態及跑狀態)被分為同一層上,非互斥的狀態(可以同時存在的狀態,例如,單位在跑的同時也可以處於攻擊狀態)在不同層。故,在本實施方式中,將全部狀態分為第一狀態層如行走狀態層、第二狀態層如動作狀態層及第三狀態層如被動狀態層。其中,所述動作狀態層及所述行走狀態層屬於主動狀態層。所述行走狀態層包括全部行走狀態。所述動作狀態層包括全部動作狀態。所述被動狀態層包括全部被動狀態。 Among them, according to the functions of the units in the game, all possible states of the unit are abstracted. All states include walking status (such as walking, running, standing, sitting, etc.), action status (such as attack, cast, death, etc.) and passive status (such as restricted movement, restricted casting, restricted attack, etc.). All states are layered according to the principle of mutual exclusion between states. The principle of mutual exclusion is a mutually exclusive state (a state that cannot exist at the same time, for example, a unit cannot be in a walking state and a running state at the same time) is divided into two layers, non-mutually exclusive states (states that can exist simultaneously, for example The unit can also be in an attack state while running. At different levels. Therefore, in the present embodiment, all states are divided into a first state layer such as a walking state layer, a second state layer such as an action state layer, and a third state layer such as a passive state layer. The action state layer and the walk state layer belong to an active state layer. The walking state layer includes all walking states. The action state layer includes all action states. The passive state layer includes all passive states.

所述被動狀態層的狀態可以進行累加。例如,所述單位在被限制移動的同時可以被限制攻擊。所述被動狀態層為用一個佔用預設位元空間的數位來存儲各個狀態。每一位元代表一個狀態。若該位的值為“1”,則代表有相應的被動狀態。該位的值為“0”,則代表無相應的被動狀態。所述預設位元的位元數由被動狀態的個數來決定。所述被動狀態層的狀態的增加和刪除就可以利用位操作實現。 The state of the passive state layer can be accumulated. For example, the unit may be restricted from attack while being restricted from moving. The passive state layer stores each state with a digit occupying a preset bit space. Each meta represents a state. If the value of this bit is "1", it means that there is a corresponding passive state. The value of this bit is "0", which means there is no corresponding passive state. The number of bits of the preset bit is determined by the number of passive states. The addition and deletion of the state of the passive state layer can be achieved using bit operations.

在其他實施方式中,所述單位的全部狀態的狀態層數量可以根據實際的狀態類型進行調整,並不限於上述的三種狀態層。 In other embodiments, the number of state layers of all states of the unit may be adjusted according to actual state types, and is not limited to the above three state layers.

S202,存儲在第一狀態層上設置的第一可轉換狀態清單,存儲在第二狀態層上設置的第二可轉換狀態清單。其中,所述第一可轉換狀態清單存儲有當前第一狀態層中的狀態可轉換為的其他狀態資訊,所述第二可轉換狀態清單存儲有當前在第二狀態層中的狀態可轉換為的其他狀態資訊。 S202. Store a first convertible state list set on the first state layer, and store a second convertible state list set on the second state layer. The first convertible state list stores other state information that the state in the current first state layer can be converted into, and the second switchable state list stores the state currently in the second state layer that can be converted into Other status information.

S203,提供外部介面,以接收外部邏輯模組調用所述外部介面而輸入的狀態控制指令。例如,要使所述單位表現出目的狀態如跑時,則外部邏輯模組需要輸入狀態控制指令來控制所述單位表現所述目的狀態。 S203. An external interface is provided to receive a state control instruction that is input by the external logic module to invoke the external interface. For example, to cause the unit to exhibit a destination state such as running, the external logic module needs to input a state control command to control the unit to represent the destination state.

S204,根據接收到的狀態控制指令生成相應的狀態參數。其中,所述狀態參數中包括所述目的狀態對應的參數,從而根據所述狀態參數即可得知需要使單位表現出的狀態為所述目的狀態。 S204. Generate a corresponding state parameter according to the received state control instruction. The state parameter includes a parameter corresponding to the target state, so that the state that needs to be expressed by the unit is known to be the target state according to the state parameter.

S205,判定所述單位的類型是否為支援狀態轉換控制的類型且所述單位是否具有生命條件。當判定所述單位的類型為支援狀態轉換控制的類型且所述單位具有生命條件時,執行步驟S206。當判定所述單位的類型不支援狀態轉換控制的類型或所述單位不具有生命條件時,執行步驟S211。 S205. Determine whether the type of the unit is a type that supports state transition control and whether the unit has a life condition. When it is determined that the type of the unit is a type supporting the state transition control and the unit has a life condition, step S206 is performed. When it is determined that the type of the unit does not support the type of the state transition control or the unit does not have a life condition, step S211 is performed.

例如,當所述單位的類型為靜止的物體,如樹木等,則所述單位的類型不支援狀態轉換控制的類型,即所述單位的類型不滿足所述類型條件。當所述單位的類型為動態的生命體,如人等,則所述單位的類型支援狀態轉換控制的類型,即所述單位的類型滿足所述類型條件。 For example, when the type of the unit is a stationary object such as a tree or the like, the type of the unit does not support the type of state transition control, that is, the type of the unit does not satisfy the type condition. When the type of the unit is a dynamic living body, such as a person or the like, the type of the unit supports the type of state transition control, that is, the type of the unit satisfies the type condition.

當所述單位是活著的,可以執行狀態功能來反應出相應的動畫效果,則表明所述單位具有生命條件,滿足所述生命條件。當所述單位是處於死亡狀態,不再能執行狀態功能,從而不能反應出相應的動畫效 果,則表明所述單位不具有生命條件,不滿足所述生命條件。故,通過判定所述單位是否可以執行狀態功能以反應相應的動畫效果來判定所述單位是否具有生命條件。 When the unit is alive, a status function can be performed to reflect the corresponding animation effect, indicating that the unit has a living condition that satisfies the life condition. When the unit is in a dead state, the status function can no longer be executed, and thus the corresponding animation effect cannot be reflected. If it is said, the unit does not have a living condition and does not satisfy the living condition. Therefore, it is determined whether the unit has a living condition by determining whether the unit can perform a status function to reflect a corresponding animation effect.

S206,根據所述狀態參數來判定所述目的狀態是否為第三狀態層的狀態。若所述目的狀態不屬於所述第三狀態層的狀態時,執行步驟S207。若所述目的狀態屬於所述第三狀態層的狀態時,執行步驟S212。 S206. Determine, according to the state parameter, whether the destination state is a state of a third state layer. If the destination state does not belong to the state of the third state layer, step S207 is performed. If the destination state belongs to the state of the third state layer, step S212 is performed.

S207,根據所述狀態參數來確定所述目的狀態是否屬於所述第一及第二狀態層中的狀態。當判定所述目的狀態屬於所述第一及第二狀態層中的狀態時,執行步驟S208。當判定所述目的狀態不屬於所述第一及第二狀態層中的狀態時,執行步驟S214。 S207. Determine, according to the state parameter, whether the destination state belongs to a state in the first and second state layers. When it is determined that the destination state belongs to a state in the first and second state layers, step S208 is performed. When it is determined that the destination state does not belong to the state in the first and second state layers, step S214 is performed.

S208,根據所述狀態參數確定所述目的狀態所屬第一及第二狀態層中的哪一狀態層。其中,當所述目的狀態為所述第一狀態層中的狀態時,則所述目的狀態所屬的狀態層為所述第一狀態層。當所述目的狀態為所述第二狀態層中的狀態時,則所述目的狀態所屬的狀態層為所述第二狀態層。 S208. Determine, according to the state parameter, which one of the first and second state layers belongs to the destination state. Wherein, when the destination state is a state in the first state layer, the state layer to which the destination state belongs is the first state layer. When the destination state is the state in the second state layer, then the state layer to which the destination state belongs is the second state layer.

S209,根據所述狀態參數判定所確定的狀態層的狀態轉換清單是否存儲有所述目的狀態及所述目的狀態是否被鎖定。當判定所確定的狀態層的狀態轉換清單存儲有所述目的狀態且所述目的狀態未被鎖定時,執行步驟S210。當判定所確定的狀態層的狀態轉換清單未存儲有所述目的狀態或所述目的狀態被鎖定時,執行步驟S215。其中,每一狀態層均存儲有狀態轉換清單。每一狀態轉換清單存儲有當前所述單位在此狀態層可以轉換為的其他狀態資訊。根據所述狀態參數判定所述確定的狀態層的狀態轉換清單中的其他狀態資訊是否有所述目的狀態。 S209. Determine, according to the state parameter, whether the state transition list of the determined state layer stores whether the destination state and the destination state are locked. When it is determined that the state transition list of the determined state layer stores the destination state and the destination state is not locked, step S210 is performed. When it is determined that the state transition list of the determined state layer does not store the destination state or the destination state is locked, step S215 is performed. Among them, each state layer stores a state transition list. Each state transition list stores other state information that the current unit can convert to at this state layer. Determining, according to the state parameter, whether other state information in the state transition list of the determined state layer has the destination state.

根據遊戲的具體要求,所述動作狀態層與所述行走狀態層之間可以設置優先順序。在本實施方式中,設定所述動作狀態層的優先順序高於所述行走狀態層,從而所述動作狀態層的狀態可以禁止所述行走狀態 層的狀態轉換。例如,當所述單位處於死亡狀態時,所述單位則不能再表現走或跑的狀態等,以符合實際邏輯需求。 According to the specific requirements of the game, a priority order may be set between the action state layer and the walk state layer. In this embodiment, the priority order of the operation state layer is set to be higher than the walking state layer, so that the state of the action state layer may prohibit the walking state. The state transition of the layer. For example, when the unit is in a state of death, the unit can no longer express the state of walking or running, etc., in order to meet the actual logic requirements.

判定所述目的狀態是否被鎖定可以包括:判定是否接收到了確定所述目的狀態所在的狀態層的優先順序低於主動狀態層中的另一狀態層優先順序的優先順序指令,及所述單位當前的狀態中是否有屬於所述另一狀態層中狀態的狀態。 Determining whether the destination state is locked may include: determining whether a priority order instruction that determines that a priority order of a state layer in which the destination state is located is lower than another state layer priority order in an active state layer, and the unit current is received Whether there is a state belonging to the state in the other state layer in the state.

當判定接收到了優先順序指令,且所述單位當前的狀態中有屬於所述另一狀態層的狀態時,則表明所述目的狀態被鎖定,發送鎖定指令;當判定未接收到優先順序指令,則表明所述目的狀態未被鎖定。例如,所述單位處於躺著並死亡的狀態,死亡狀態所在的狀態層的優先順序被確定高於躺著狀態所在的狀態層的優先順序,若所述目的狀態為走時,則表明所述走的狀態被鎖定。 When it is determined that the priority order instruction is received, and the current state of the unit has a state belonging to the another state layer, it indicates that the destination state is locked, and a lock instruction is sent; when it is determined that the priority order command is not received, It indicates that the destination state is not locked. For example, the unit is in a state of lying down and dying, the priority order of the state layer in which the death state is located is determined to be higher than the priority order of the state layer in which the lying state is located, and if the destination state is walking, it indicates The state of walking is locked.

根據鎖定指令鎖定所述目的狀態所在的狀態層,以禁止所述單位表現所述目的狀態。 The state layer in which the destination state is located is locked according to a lock instruction to prohibit the unit from expressing the destination state.

S210,控制所述單位退出所述目的狀態所在的狀態層中的當前狀態,進入所述目的狀態,從而控制所述單位表現所述目的狀態。其中,每一狀態均對應一個進入介面及一個退出介面。所述進入介面用於使所述單位進入相應的狀態,完成相應的功能並呈現相應的動畫效果。所述退出介面用於使所述單位退出相應的狀態,完成退出相應的功能。所述單位通過所述目的狀態所在狀態層的當前狀態的退出介面退出該狀態層的當前狀態,並通過所述目的狀態的進入介面進入所述目的狀態,從而控制所述單位表現所述目的狀態。而與所述目的狀態不同狀態層的當前狀態繼續維持其狀態。例如,所述單位目前的狀態處於走並進行攻擊。所述目的狀態為跑。其中跑的狀態與走的狀態為同一狀態層。攻擊的狀態與走及跑的狀態不為同一狀態層。要使所述單位表現跑的狀態。則需要通過走狀態的退出介面退出走狀態,並通過跑狀態的進入介面進入跑狀態。所述攻擊狀 態繼續維持。此時,所述單位表示跑並進行攻擊,從而實現了控制所述單位表示跑的狀態。 S210. Control the unit to exit the current state in the state layer where the destination state is located, and enter the destination state, thereby controlling the unit to represent the destination state. Each state corresponds to an entry interface and an exit interface. The entry interface is used to bring the unit into a corresponding state, complete the corresponding function and present a corresponding animation effect. The exit interface is used to cause the unit to exit the corresponding state and complete the exit of the corresponding function. The unit exits the current state of the state layer by using an exit interface of a current state of the state layer in which the destination state is located, and enters the target state through an entry interface of the target state, thereby controlling the unit to represent the target state. . The current state of the state layer, unlike the target state, continues to maintain its state. For example, the current state of the unit is going and attacking. The target state is running. The running state and the walking state are the same state layer. The state of the attack is not in the same state layer as the state of walking and running. To make the unit show the state of running. Then, it is necessary to exit the state through the exit interface of the state, and enter the running state through the entry interface of the running state. Attack form The state continues to maintain. At this time, the unit indicates running and attacking, thereby realizing the state in which the unit is controlled to run.

初始時,每一狀態層的狀態轉換清單的狀態均為預設狀態。當所述單位退出與目的狀態同一狀態層的當前狀態,且進入所述目的狀態時,將該狀態層的狀態轉換清單中的狀態修改為所述目的狀態可轉換的其他狀態,並存儲修改後的狀態轉換清單。當所述單位退出所述目的狀態時,將該狀態層的狀態轉換清單中的狀態恢復為預設狀態。 Initially, the state of the state transition list for each state layer is the preset state. When the unit exits the current state of the same state layer as the destination state, and enters the destination state, the state in the state transition list of the state layer is modified to other states that the destination state can be converted, and the modified state is stored. A list of state transitions. When the unit exits the destination state, the state in the state transition list of the state layer is restored to a preset state.

S211,發送第一指令以表明狀態表現失敗的第一原因。 S211. Send a first instruction to indicate the first reason that the status performance fails.

S212,發送管理指令。 S212, sending a management instruction.

S213,根據管理指令將所述目的狀態累加至所述單位使所述單位表現出所述目的狀態。 S213. Accumulate the target state to the unit according to the management instruction, so that the unit exhibits the target state.

S214,發送第二指令以表明狀態表現失敗的第二原因。 S214. Send a second instruction to indicate a second cause of failure of the status performance.

S215,發送第三指令以表明狀態表現失敗的第三原因。其中,發送狀態表現失敗的第一至第三原因用於指示狀態表現失敗的原因。 S215. Send a third instruction to indicate a third reason that the status performance fails. The first to third causes of the failure of the transmission status performance are used to indicate the reason for the failure of the status performance.

在本較佳實施方式中,本發明通過提供外部介面,以接收外部邏輯模組調用所述外部介面而輸入的狀態控制指令;根據接收到的狀態控制指令生成相應的狀態參數;判定所述單位是否滿足第一預設條件;若所述單位滿足第一預設條件,則根據所述狀態參數來確定目的狀態所屬的狀態層;根據所述狀態參數判定所述目的狀態是否滿足所確定的狀態層的第二預設條件;及若所述目的狀態滿足所確定的狀態層的第二預設條件時,則控制所述單位表現所述目的狀態。本發明實現了對遊戲中單位的狀態及功能的控制,從而簡化了遊戲程式,提高了遊戲的穩定性。 In the preferred embodiment, the present invention provides a state control command input by the external logic module to call the external interface by providing an external interface; generating a corresponding state parameter according to the received state control command; determining the unit Whether the first preset condition is met; if the unit satisfies the first preset condition, determining a state layer to which the target state belongs according to the state parameter; determining, according to the state parameter, whether the target state satisfies the determined state a second preset condition of the layer; and if the target state satisfies the second preset condition of the determined state layer, controlling the unit to represent the target state. The invention realizes the control of the state and function of the unit in the game, thereby simplifying the game program and improving the stability of the game.

下面將結合附圖3及附圖4,對本發明實施例提供的一種業務平台中單位狀態控制的系統進行詳細介紹。可以理解的是,下述的系統可以應用於上述圖1及圖2所示方法中。在本實施方式中,所述業務平台為遊戲。 A unit state control system in a service platform according to an embodiment of the present invention will be described in detail below with reference to FIG. 3 and FIG. It will be appreciated that the system described below can be applied to the methods illustrated in Figures 1 and 2 above. In this embodiment, the service platform is a game.

請參見圖3,為本發明實施例提供的一種業務平台中單位狀態控制的系統的結構示意圖;該業務平台中單位狀態控制的系統用於控制所述單位表示目的狀態。該系統可以包括:外部介面單元101、判定單元102及控制單元103。 FIG. 3 is a schematic structural diagram of a system for unit state control in a service platform according to an embodiment of the present invention; a system for unit state control in the service platform is used to control the unit to indicate a destination state. The system may include an external interface unit 101, a determination unit 102, and a control unit 103.

所述外部介面單元101用於提供外部介面,以接收外部邏輯模組調用所述外部介面而輸入的狀態控制指令,並根據接收到的狀態控制指令生成相應的狀態參數。例如,要使所述單位表現出目的狀態如跑時,則外部邏輯模組需要輸入狀態控制指令來控制所述單位表現所述目的狀態。其中,所述狀態參數中包括所述目的狀態對應的參數,從而根據所述狀態參數即可得知需要使單位表現出的狀態為所述目的狀態。 The external interface unit 101 is configured to provide an external interface to receive a state control instruction input by the external logic module to invoke the external interface, and generate a corresponding state parameter according to the received state control instruction. For example, to cause the unit to exhibit a destination state such as running, the external logic module needs to input a state control command to control the unit to represent the destination state. The state parameter includes a parameter corresponding to the target state, so that the state that needs to be expressed by the unit is known to be the target state according to the state parameter.

所述判定單元102用於判定所述單位是否滿足第一預設條件。具體地,所述第一預設條件包括單位的類型條件及單位的生命條件。 The determining unit 102 is configured to determine whether the unit satisfies a first preset condition. Specifically, the first preset condition includes a unit type condition and a unit life condition.

所述判定單元102用於判定所述單位的類型是否為支援狀態轉換控制的類型。例如,當所述單位的類型為靜止的物體,如樹木等,則所述單位的類型不支援狀態轉換控制的類型,即所述單位的類型不滿足所述類型條件。當所述單位的類型為動態的生命體,如人等,則所述單位的類型支援狀態轉換控制的類型,即所述單位的類型滿足所述類型條件。 The determining unit 102 is configured to determine whether the type of the unit is of a type that supports state transition control. For example, when the type of the unit is a stationary object such as a tree or the like, the type of the unit does not support the type of state transition control, that is, the type of the unit does not satisfy the type condition. When the type of the unit is a dynamic living body, such as a person or the like, the type of the unit supports the type of state transition control, that is, the type of the unit satisfies the type condition.

所述判定單元102還用於判定所述單位是否具有生命條件。當所述單位是活著的,可以執行狀態功能來反應出相應的動畫效果,則表明所述單位具有生命條件,滿足所述生命條件。當所述單位是處於死亡狀態,不再能執行狀態功能,從而不能反應出相應的動畫效果,則表明所述單位不具有生命條件,不滿足所述生命條件。故,所述判定單元102通過判定所述單位是否可以執行狀態功能以反應相應的動畫效果來判定所述單位是否具有生命條件。當所述單位的類型滿足所述類型條件且所述單位滿足生命條件時,則判定所述單位滿足所述第一預設條件。 The determining unit 102 is further configured to determine whether the unit has a living condition. When the unit is alive, a status function can be performed to reflect the corresponding animation effect, indicating that the unit has a living condition that satisfies the life condition. When the unit is in a dead state and can no longer perform the state function, thereby failing to reflect the corresponding animation effect, it indicates that the unit does not have a living condition and does not satisfy the life condition. Therefore, the determining unit 102 determines whether the unit has a living condition by determining whether the unit can perform a status function to reflect a corresponding animation effect. When the type of the unit satisfies the type condition and the unit satisfies the life condition, it is determined that the unit satisfies the first preset condition.

所述判定單元102還用於在所述單位滿足第一預設條件 時,根據所述狀態參數來確定目的狀態所屬的狀態層。其中,根據遊戲中的單位所具有的功能,抽象出所述單位所具有的可能的全部狀態。全部狀態包括行走狀態(如走、跑、站立、坐等)、動作狀態(如攻擊、施法、死亡等)及被動狀態(如被限制移動、被限制施法、被限制攻擊等)。根據狀態之間互斥的原則對全部狀態進行分層。所謂互斥的原則即為互斥的狀態(不能同時存在的狀態,例如,單位不能同時處於走狀態及跑狀態)被分為同一層上,非互斥的狀態(可以同時存在的狀態,例如,單位在跑的同時也可以處於攻擊狀態)在不同層。故,在本實施方式中,將全部狀態分為第一狀態層如行走狀態層、第二狀態層如動作狀態層及第三狀態層如被動狀態層。其中,所述動作狀態層及所述行走狀態層屬於主動狀態層。所述行走狀態層包括全部行走狀態。所述動作狀態層包括全部動作狀態。所述被動狀態層包括全部被動狀態。 The determining unit 102 is further configured to meet the first preset condition in the unit The state layer to which the destination state belongs is determined according to the state parameter. Among them, according to the functions of the units in the game, all possible states of the unit are abstracted. All states include walking status (such as walking, running, standing, sitting, etc.), action status (such as attack, cast, death, etc.) and passive status (such as restricted movement, restricted casting, restricted attack, etc.). All states are layered according to the principle of mutual exclusion between states. The principle of mutual exclusion is a mutually exclusive state (a state that cannot exist at the same time, for example, a unit cannot be in a walking state and a running state at the same time) is divided into two layers, non-mutually exclusive states (states that can exist simultaneously, for example The unit can also be in an attack state while running. At different levels. Therefore, in the present embodiment, all states are divided into a first state layer such as a walking state layer, a second state layer such as an action state layer, and a third state layer such as a passive state layer. The action state layer and the walk state layer belong to an active state layer. The walking state layer includes all walking states. The action state layer includes all action states. The passive state layer includes all passive states.

所述被動狀態層的狀態可以進行累加。例如,所述單位在被限制移動的同時可以被限制攻擊。所述被動狀態層為用一個佔用預設位元空間的數位來存儲各個狀態。每一位元代表一個狀態。若該位的值為“1”,則代表有相應的被動狀態。該位的值為“0”,則代表無相應的被動狀態。所述預設位元的位元數由被動狀態的個數來決定。所述被動狀態層的狀態的增加和刪除就可以利用位操作實現。 The state of the passive state layer can be accumulated. For example, the unit may be restricted from attack while being restricted from moving. The passive state layer stores each state with a digit occupying a preset bit space. Each meta represents a state. If the value of this bit is "1", it means that there is a corresponding passive state. The value of this bit is "0", which means there is no corresponding passive state. The number of bits of the preset bit is determined by the number of passive states. The addition and deletion of the state of the passive state layer can be achieved using bit operations.

在其他實施方式中,所述單位的全部狀態的狀態層數量可以根據實際的狀態類型進行調整,並不限於上述的三種狀態層。 In other embodiments, the number of state layers of all states of the unit may be adjusted according to actual state types, and is not limited to the above three state layers.

具體地,所述判定單元102用於在所述單位滿足第一預設條件,則根據所述狀態參數來確定所述目的狀態是否屬於所述第一及第二狀態層中的狀態。若所述目的狀態是否屬於所述第一及第二狀態層中的狀態,所述判定單元102用於根據所述狀態參數確定所述目的狀態所屬第一及第二狀態層中的哪一狀態層。 Specifically, the determining unit 102 is configured to determine, according to the state parameter, whether the target state belongs to a state in the first and second state layers according to the first preset condition. If the target state belongs to a state in the first and second state layers, the determining unit 102 is configured to determine, according to the state parameter, which one of the first and second state layers the target state belongs to Floor.

所述判定單元102還用於根據所述狀態參數判定所述目的 狀態是否滿足所確定的狀態層的第二預設條件。 The determining unit 102 is further configured to determine the purpose according to the state parameter Whether the state satisfies the second preset condition of the determined state layer.

具體地,所述第二預設條件包括可轉換狀態條件及非鎖定條件。所述判定單元102根據所述狀態參數判定所確定的狀態層的狀態轉換清單是否存儲有所述目的狀態以判定是否滿足所述可轉換狀態條件,並判定所述目的狀態是否被鎖定以判定是否滿足所述非鎖定條件。當確定的狀態層的狀態轉換清單存儲有所述目的狀態且所述目的狀態未被鎖定時,表明所述目的狀態滿足所確定的狀態層的第二預設條件。其中,每一狀態層均存儲有狀態轉換清單。每一狀態轉換清單存儲有當前所述單位在此狀態層可以轉換為的其他狀態資訊。根據所述狀態參數判定所述確定的狀態層的狀態轉換清單中的其他狀態資訊是否有所述目的狀態。 Specifically, the second preset condition includes a convertible state condition and a non-locking condition. The determining unit 102 determines, according to the state parameter, whether the state transition list of the determined state layer stores the target state to determine whether the switchable state condition is satisfied, and determines whether the target state is locked to determine whether The non-locking condition is satisfied. When the state transition list of the determined state layer stores the destination state and the destination state is not locked, indicating that the destination state satisfies the second preset condition of the determined state layer. Among them, each state layer stores a state transition list. Each state transition list stores other state information that the current unit can convert to at this state layer. Determining, according to the state parameter, whether other state information in the state transition list of the determined state layer has the destination state.

根據遊戲的具體要求,所述動作狀態層與所述行走狀態層之間可以設置優先順序。在本實施方式中,設定所述動作狀態層的優先順序高於所述行走狀態層,從而所述動作狀態層的狀態可以禁止所述行走狀態層的狀態轉換。例如,當所述單位處於死亡狀態時,所述單位則不能再表現走或跑的狀態等,以符合實際邏輯需求。 According to the specific requirements of the game, a priority order may be set between the action state layer and the walk state layer. In the present embodiment, the priority order of the operation state layer is set to be higher than the walking state layer, so that the state of the action state layer can prohibit state transition of the walking state layer. For example, when the unit is in a state of death, the unit can no longer express the state of walking or running, etc., in order to meet the actual logic requirements.

所述控制單元103用於當所述目的狀態滿足所確定的狀態層的第二預設條件時,控制所述單位表現所述目的狀態。其中,每一狀態均對應一個進入介面及一個退出介面。所述進入介面用於使所述單位進入相應的狀態,完成相應的功能並呈現相應的動畫效果。所述退出介面用於使所述單位退出相應的狀態,完成退出相應的功能。所述單位通過所述目的狀態所在狀態層的當前狀態的退出介面退出該狀態層的當前狀態,並通過所述目的狀態的進入介面進入所述目的狀態,從而控制所述單位表現所述目的狀態。而與所述目的狀態不同狀態層的當前狀態繼續維持其狀態。例如,所述單位目前的狀態處於走並進行攻擊。所述目的狀態為跑。其中跑的狀態與走的狀態為同一狀態層。攻擊的狀態與走及跑的狀態不為同一狀態層。要使所述單位表現跑的狀態。則需要通過走狀態的退出介面退出 走狀態,並通過跑狀態的進入介面進入跑狀態。所述攻擊狀態繼續維持。此時,所述單位表示跑並進行攻擊,從而實現了控制所述單位表示跑的狀態。 The control unit 103 is configured to control the unit to represent the destination state when the destination state satisfies a second preset condition of the determined state layer. Each state corresponds to an entry interface and an exit interface. The entry interface is used to bring the unit into a corresponding state, complete the corresponding function and present a corresponding animation effect. The exit interface is used to cause the unit to exit the corresponding state and complete the exit of the corresponding function. The unit exits the current state of the state layer by using an exit interface of a current state of the state layer in which the destination state is located, and enters the target state through an entry interface of the target state, thereby controlling the unit to represent the target state. . The current state of the state layer, unlike the target state, continues to maintain its state. For example, the current state of the unit is going and attacking. The target state is running. The running state and the walking state are the same state layer. The state of the attack is not in the same state layer as the state of walking and running. To make the unit show the state of running. You need to exit by exiting the exit interface. Go to the state and enter the running state through the entry interface of the running state. The attack state continues to be maintained. At this time, the unit indicates running and attacking, thereby realizing the state in which the unit is controlled to run.

初始時,每一狀態層的狀態轉換清單的狀態均為預設狀態。當所述單位退出與目的狀態同一狀態層的當前狀態,且進入所述目的狀態時,將該狀態層的狀態轉換清單中的狀態修改為所述目的狀態可轉換的其他狀態,並存儲修改後的狀態轉換清單。當所述單位退出所述目的狀態時,將該狀態層的狀態轉換清單中的狀態恢復為預設狀態。 Initially, the state of the state transition list for each state layer is the preset state. When the unit exits the current state of the same state layer as the destination state, and enters the destination state, the state in the state transition list of the state layer is modified to other states that the destination state can be converted, and the modified state is stored. A list of state transitions. When the unit exits the destination state, the state in the state transition list of the state layer is restored to a preset state.

在本較佳實施方式中,本發明通過外部介面單元101提供外部介面,以接收外部邏輯模組調用所述外部介面而輸入的狀態控制指令,並根據接收到的狀態控制指令生成相應的狀態參數;所述判定單元102判定所述單位是否滿足第一預設條件;若所述單位滿足第一預設條件,則根據所述狀態參數來確定目的狀態所屬的狀態層;根據所述狀態參數判定所述目的狀態是否滿足所確定的狀態層的第二預設條件;及所述控制單元103在所述目的狀態滿足所確定的狀態層的第二預設條件時,控制所述單位表現所述目的狀態。本發明實現了對遊戲中單位的狀態及功能的控制,從而簡化了遊戲程式,提高了遊戲的穩定性。 In the preferred embodiment, the present invention provides an external interface through the external interface unit 101 to receive a state control instruction input by the external logic module to invoke the external interface, and generate a corresponding state parameter according to the received state control instruction. The determining unit 102 determines whether the unit satisfies the first preset condition; if the unit satisfies the first preset condition, determining a state layer to which the target state belongs according to the state parameter; determining according to the state parameter Whether the target state satisfies a second preset condition of the determined state layer; and the control unit 103 controls the unit performance to be performed when the target state satisfies a second preset condition of the determined state layer Destination status. The invention realizes the control of the state and function of the unit in the game, thereby simplifying the game program and improving the stability of the game.

請參見圖4,為本發明第二較佳方式提供的一種業務平台中單位狀態控制的系統與第一較佳實施方式相同。本發明第二較佳實施方式相較於第一較佳實施方式的區別在於:第二較佳實施方式提供的一種業務平台中單位狀態控制的系統還包括記錄單元104、存儲單元105、進入介面單元106、退出介面單元107、修改單元108、發送單元109、狀態鎖單元110。 Referring to FIG. 4, a system for unit state control in a service platform according to a second preferred embodiment of the present invention is the same as the first preferred embodiment. The second preferred embodiment of the present invention is different from the first preferred embodiment in that the system for unit state control in a service platform provided by the second preferred embodiment further includes a recording unit 104, a storage unit 105, and an entry interface. The unit 106, the exit interface unit 107, the modification unit 108, the transmitting unit 109, and the state lock unit 110.

所述記錄單元104用於記錄對所述單位的狀態進行分層後的第一狀態層、第二狀態層及第三狀態層,及第一至第三狀態層中的狀態。在本實施方式中,所述第一狀態層為行走狀態層。所述第二狀態層為動作 狀態層。所述第三狀態層為被動狀態層。在其他實施方式中,所述單位的全部狀態的狀態層數量可以根據實際的狀態類型進行調整,並不限於上述的三種狀態層。 The recording unit 104 is configured to record the first state layer, the second state layer, and the third state layer, and the states in the first to third state layers, which are layered in the state of the unit. In this embodiment, the first state layer is a walking state layer. The second state layer is an action State layer. The third state layer is a passive state layer. In other embodiments, the number of state layers of all states of the unit may be adjusted according to actual state types, and is not limited to the above three state layers.

所述存儲單元105用於存儲在第一狀態層上設置的第一可轉換狀態清單,存儲在第二狀態層上設置的第二可轉換狀態清單,其中,所述第一可轉換狀態清單存儲有當前第一狀態層中的狀態可轉換為的其他狀態資訊,所述第二可轉換狀態清單存儲有當前在第二狀態層中的狀態可轉換為的其他狀態資訊。 The storage unit 105 is configured to store a first convertible state list set on the first state layer, and store a second convertible state list set on the second state layer, wherein the first convertible state list is stored There is other state information that the state in the current first state layer can be converted to, and the second switchable state list stores other state information to which the state currently in the second state layer can be converted.

所述判定單元102還用於根據所述狀態參數來判定所述目的狀態是否為第三狀態層的狀態,並當所述目的狀態不屬於所述第三狀態層的狀態時確定所述目的狀態是否屬於所述第一及第二狀態層中的狀態。 The determining unit 102 is further configured to determine, according to the state parameter, whether the target state is a state of a third state layer, and determine the target state when the target state does not belong to a state of the third state layer. Whether it belongs to the state in the first and second state layers.

所述進入介面單元106用於提供進入介面,以使所述控制單元103調用所述進入介面從而使所述單位進入相應的狀態,完成相應的功能並呈現相應的動畫效果。 The entry interface unit 106 is configured to provide an entry interface such that the control unit 103 invokes the entry interface to cause the unit to enter a corresponding state, complete the corresponding function, and present a corresponding animation effect.

所述退出介面單元107用於提供退出介面,以使所述控制單元103調用所述退出介面從而使所述單位退出相應的狀態,完成退出相應的功能。 The exit interface unit 107 is configured to provide an exit interface, so that the control unit 103 invokes the exit interface to cause the unit to exit the corresponding state, and complete the exit of the corresponding function.

其中,每一狀態均對應進入介面及退出介面。所述進入介面單元106用於調用所述進入介面,以使所述單位進入相應的狀態,完成相應的功能並呈現相應的動畫效果。所述退出介面單元107用於調用所述退出介面,以使所述單位退出相應的狀態,完成退出相應的功能。 Each state corresponds to the entry interface and the exit interface. The entry interface unit 106 is configured to invoke the entry interface to cause the unit to enter a corresponding state, complete a corresponding function, and present a corresponding animation effect. The exit interface unit 107 is configured to invoke the exit interface to cause the unit to exit the corresponding state and complete the exit of the corresponding function.

所述修改單元108用於當所述單位退出與所述目的狀態同一狀態層的當前狀態,且進入所述目的狀態時,將該狀態層的狀態轉換清單中的狀態修改為所述目的狀態可轉換的其他狀態。 The modifying unit 108 is configured to: when the unit exits the current state of the same state layer as the target state, and enter the destination state, modify the state in the state transition list of the state layer to the target state. Other states of the conversion.

所述存儲單元105還用於存儲修改後的狀態轉換清單。 The storage unit 105 is further configured to store the modified state transition list.

其中,所述修改單元108還用於當所述單位退出所述目的狀 態時,將所述目的狀態所在的狀態層的狀態轉換清單中的狀態恢復為預設狀態。 The modifying unit 108 is further configured to: when the unit exits the target In the state, the state in the state transition list of the state layer in which the destination state is located is restored to the preset state.

所述發送單元109用於在所述判定單元105判定接收到了優先順序指令,且所述單位當前的狀態中有屬於更高優先順序的狀態層的狀態時時,發送鎖定指令。所述發送單元109還用於當所述目的狀態屬於所述第三狀態層的狀態時,發送管理指令以將所述目的狀態累加至所述單位使所述單位表現出所述目的狀態。 The transmitting unit 109 is configured to send a lock instruction when the determining unit 105 determines that the priority order command is received and the state of the current state of the unit has a state layer belonging to a higher priority order. The sending unit 109 is further configured to: when the destination state belongs to a state of the third state layer, send a management instruction to accumulate the destination state to the unit to cause the unit to express the destination state.

所述狀態鎖單元110用於根據鎖定指令鎖定所述目的狀態所在的狀態層,以禁止控制所述單位表現所述目的狀態。 The state lock unit 110 is configured to lock a state layer in which the destination state is located according to a lock instruction to prohibit control of the unit from expressing the destination state.

所述發送單元109還用於當所述單位不滿足所述第一預設條件,發送第一指令以表明狀態表現失敗的第一原因,當判定所述目的狀態不屬於所述第一及第二狀態層中的狀態時,發送第二指令以表明狀態表現失敗的第二原因;及當判定所確定的狀態層的狀態轉換清單未存儲有所述目的狀態或所述目的狀態被鎖定時,發送第三指令以表明狀態表現失敗的第三原因。 The sending unit 109 is further configured to: when the unit does not satisfy the first preset condition, send a first instruction to indicate a first cause of failure of the state performance, when determining that the destination state does not belong to the first and the first When the state in the two state layers is, the second instruction is sent to indicate the second cause of the state performance failure; and when it is determined that the state transition list of the determined state layer does not store the destination state or the destination state is locked, The third instruction is sent to indicate the third reason why the status performance failed.

在本較佳實施方式中,本發明通過外部介面單元101提供外部介面,以接收外部邏輯模組調用所述外部介面而輸入的狀態控制指令,並根據接收到的狀態控制指令生成相應的狀態參數;所述判定單元102判定所述單位是否滿足第一預設條件;若所述單位滿足第一預設條件,則根據所述狀態參數來確定目的狀態所屬的狀態層;根據所述狀態參數判定所述目的狀態是否滿足所確定的狀態層的第二預設條件;及所述控制單元103在所述目的狀態滿足所確定的狀態層的第二預設條件時,控制所述單位表現所述目的狀態。本發明實現了對遊戲中單位的狀態及功能的切換控制,從而簡化了遊戲程式,提高了遊戲的穩定性。 In the preferred embodiment, the present invention provides an external interface through the external interface unit 101 to receive a state control instruction input by the external logic module to invoke the external interface, and generate a corresponding state parameter according to the received state control instruction. The determining unit 102 determines whether the unit satisfies the first preset condition; if the unit satisfies the first preset condition, determining a state layer to which the target state belongs according to the state parameter; determining according to the state parameter Whether the target state satisfies a second preset condition of the determined state layer; and the control unit 103 controls the unit performance to be performed when the target state satisfies a second preset condition of the determined state layer Destination status. The invention realizes the switching control of the state and function of the unit in the game, thereby simplifying the game program and improving the stability of the game.

本領域普通技術人員可以理解實現上述實施例方法中的全部或部分流程,是可以通過電腦程式來指令相關的硬體來完成,所述的程 式可存儲於一電腦可讀取存儲介質中,該程式在執行時,可包括如上述各方法的實施例的流程。其中,所述的存儲介質可為磁碟、光碟、唯讀存儲記憶體(Read-Only Memory,ROM)或隨機存儲記憶體(Random Access Memory,RAM)等。 A person skilled in the art can understand that all or part of the process of implementing the foregoing embodiment method can be completed by a computer program to instruct related hardware. The program may be stored in a computer readable storage medium, which, when executed, may include the flow of an embodiment of the methods described above. The storage medium may be a magnetic disk, a optical disk, a read-only memory (ROM), or a random access memory (RAM).

以上所揭露的僅為本發明較佳實施例而已,當然不能以此來限定本發明之權利範圍,因此依本發明權利要求所作的等同變化,仍屬本發明所涵蓋的範圍。 The above is only the preferred embodiment of the present invention, and the scope of the present invention is not limited thereto, and thus equivalent changes made in the claims of the present invention are still within the scope of the present invention.

S101、S102、S103、S104、S105、S106、S107、S108‧‧‧步驟 Steps S101, S102, S103, S104, S105, S106, S107, S108‧‧

Claims (18)

一種業務平台中單位狀態控制的方法,用於一種業務平台中單位狀態控制的系統,該系統包括一外部介面單元,一判定單元以及一控制單元,該方法包括:該外部介面接收輸入的一狀態控制指令;根據接收到的該狀態控制指令生成相應的一狀態參數;該判定單元判定該單位是否滿足一第一預設條件;若該單位滿足該第一預設條件,則根據該狀態參數來確定一目的狀態所屬的一狀態層,若該單位不滿足該第一預設條件,發送一第一指令以表明狀態表現失敗的一第一原因;該判定單元根據該狀態參數判定該目的狀態是否滿足所確定的該狀態層的一第二預設條件;及若該目的狀態滿足所確定的該狀態層的該第二預設條件,則該控制單元控制該單位表現該目的狀態,若該目的狀態不滿足確定的狀態層的該第二預設條件時,發送一第二指令以表明狀態表現失敗的一第二原因;其中,該目的狀態包含該單位的多種獨立式的行為表現,該些獨立式的行為表現之間依據是否互斥而區分為多種狀態層,且相同狀態層中的多種獨立式的行為表現為互斥,而不同狀態層中的多種獨立式的行為表現之間允許互相搭配而使該單位表現出一複合式的行為表現。 A method for unit state control in a service platform, for a unit state control system in a service platform, the system comprising an external interface unit, a determination unit and a control unit, the method comprising: the external interface receiving a state of the input a control instruction; generating a corresponding one of the state parameters according to the received state control command; the determining unit determines whether the unit satisfies a first preset condition; if the unit satisfies the first preset condition, according to the state parameter Determining a state layer to which a destination state belongs, and if the unit does not satisfy the first preset condition, sending a first instruction to indicate a first cause of failure of the state performance; the determining unit determines whether the destination state is based on the state parameter Satisfying the determined second preset condition of the state layer; and if the destination state satisfies the determined second preset condition of the state layer, the control unit controls the unit to represent the target state, if the destination When the state does not satisfy the second preset condition of the determined state layer, a second instruction is sent to indicate that the state is out of performance a second reason; wherein the destination state includes multiple independent behaviors of the unit, and the independent behaviors are distinguished into multiple state layers according to whether they are mutually exclusive, and multiple independent in the same state layer The behavior of the expression is mutually exclusive, and the multiple independent behaviors in different state layers allow mutual matching so that the unit exhibits a compound behavior. 如申請專利範圍第1項所述的方法,其中判定該單位是否滿足該第一預設條件包括:判定該單位的類型是否為一支援狀態轉換控制的類型;及判定該單位是否具有一生命條件;當該單位的類型為該支援狀態轉換控制的類型且該單位具有該生命條 件時,則判定該單位滿足該第一預設條件。 The method of claim 1, wherein determining whether the unit satisfies the first preset condition comprises: determining whether the type of the unit is a type of support state transition control; and determining whether the unit has a life condition When the type of the unit is the type of the support state transition control and the unit has the life bar When the piece is determined, it is determined that the unit satisfies the first preset condition. 如申請專利範圍第1項所述的方法,其中若該單位滿足該第一預設條件,則根據該狀態參數來確定該目的狀態所屬的該狀態層之前還包括:記錄對該單位的一狀態進行分層後的一第一狀態層及一第二狀態層,及該第一狀態層與該第二狀態層中的狀態,其中該第一狀態層的狀態為互斥狀態,該第二狀態層的狀態與該第一狀態層的狀態為非互斥狀態;存儲在該第一狀態層上設置的一第一可轉換狀態清單,存儲在該第二狀態層上設置的一第二可轉換狀態清單,其中,該第一可轉換狀態清單存儲有當前該第一狀態層中的狀態可轉換為的其他狀態資訊,該第二可轉換狀態清單存儲有當前在該第二狀態層中的狀態可轉換為的其他狀態資訊;其中,若該單位滿足該第一預設條件,則根據該狀態參數來確定該目的狀態所屬該第一狀態層及該第二狀態層中的哪一狀態層。 The method of claim 1, wherein if the unit satisfies the first preset condition, determining, according to the state parameter, the state layer to which the destination state belongs includes: recording a state of the unit a layered first state layer and a second state layer, and a state in the first state layer and the second state layer, wherein the state of the first state layer is a mutually exclusive state, the second state The state of the layer and the state of the first state layer are non-mutually exclusive; storing a first switchable state list set on the first state layer, and storing a second convertible set on the second state layer a status list, wherein the first convertible status list stores other status information that the status in the first status layer is currently convertible, and the second convertible status list stores a status currently in the second status layer Other state information that can be converted to; wherein, if the unit satisfies the first preset condition, determining, according to the state parameter, which of the first state layer and the second state layer the target state belongs to . 如申請專利範圍第3項所述的方法,其中在根據該狀態參數來確定該目的狀態所屬的該狀態層之前包括:根據該狀態參數來確定該目的狀態是否屬於該第一狀態層及該第二狀態層中的狀態;其中,若該目的狀態是否屬於該第一狀態層及該第二狀態層中的狀態,則根據該狀態參數確定該目的狀態所屬該第一狀態層及該第二狀態層中的哪一狀態層。 The method of claim 3, wherein before determining the state layer to which the destination state belongs according to the state parameter, determining, according to the state parameter, determining whether the destination state belongs to the first state layer and the first a state in the second state layer; wherein, if the destination state belongs to the state in the first state layer and the second state layer, determining, according to the state parameter, that the destination state belongs to the first state layer and the second state Which state layer in the layer. 如申請專利範圍第4項所述的方法,其中根據該狀態參數判定該目的狀態是否滿足確定的該狀態層的該第二預設條件包括:根據該狀態參數判定所確定的該狀態層的一狀態轉換清單是否存儲有該目的狀態,並判定該目的狀態是否被鎖定; 當確定的該狀態層的該狀態轉換清單存儲有該目的狀態且該目的狀態未被鎖定時,退出所確定的該狀態層的當前狀態,進入該目的狀態,從而控制該單位表現該目的狀態。 The method of claim 4, wherein determining whether the destination state satisfies the determined second preset condition of the state layer according to the state parameter comprises: determining, according to the state parameter, the determined one of the state layers Whether the state transition list stores the destination state and determines whether the destination state is locked; When the determined state transition list of the state layer stores the destination state and the destination state is not locked, the determined current state of the state layer is exited, and the destination state is entered, thereby controlling the unit to represent the destination state. 如申請專利範圍第5項所述的方法,其中當該單位退出所確定的該狀態層的當前狀態,並進入該目的狀態時,將所確定的該狀態層的該狀態轉換清單中的狀態修改為該目的狀態可轉換為的其他狀態,並存儲修改後的該狀態轉換清單,當該單位退出該目的狀態時,將所確定的該狀態層的該狀態轉換清單中的狀態恢復為一預設狀態。 The method of claim 5, wherein when the unit exits the determined current state of the state layer and enters the destination state, the determined state transition in the state transition list of the state layer is modified. Other states that can be converted to the state for the purpose, and store the modified state transition list. When the unit exits the destination state, the determined state transition state list of the state layer is restored to a preset. status. 如申請專利範圍第5項所述的方法,其中判定該目的狀態是否被鎖定包括:判定是否接收到了確定該目的狀態所在的該狀態層的優先順序低於該第一狀態層及該第二狀態層中的另一狀態層優先順序的一優先順序指令,及該單位當前的狀態中是否有屬於另一狀態層的狀態;當判定接收到了該優先順序指令,且該單位當前的狀態中有屬於該另一狀態層的狀態時,發送一鎖定指令;根據該鎖定指令鎖定該目的狀態所在的狀態層,以禁止該單位表現該目的狀態。 The method of claim 5, wherein determining whether the destination state is locked comprises: determining whether a priority order of the state layer determining the destination state is lower than the first state layer and the second state a priority order instruction of another state layer priority order in the layer, and whether there is a state belonging to another state layer in the current state of the unit; when it is determined that the priority order instruction is received, and the current state of the unit belongs to In the state of the other state layer, a lock command is sent; the state layer in which the destination state is located is locked according to the lock command to prohibit the unit from expressing the destination state. 如申請專利範圍第5項所述的方法,其中在提供該外部介面,以接收輸入的該狀態控制指令之前還包括:記錄對該單位的狀態進行分層後的一第三狀態層;該第三狀態層的狀態為非互斥狀態,且與該第一狀態層及該第二狀態層的狀態為非互斥狀態;其中,若該單位滿足該第一預設條件,則根據該狀態參數來確定該目的狀態所屬的狀態層之前還包括: 根據該狀態參數來判定該目的狀態是否為該第三狀態層的狀態;若該目的狀態不屬於該第三狀態層的狀態時,確定該目的狀態所屬的狀態層。 The method of claim 5, wherein before the providing the external interface to receive the input of the state control instruction, the method further comprises: recording a third state layer layered by the state of the unit; The state of the three-state layer is a non-exclusive state, and the state of the first state layer and the second state layer is a non-exclusive state; wherein, if the unit satisfies the first preset condition, according to the state parameter Before determining the status layer to which the destination state belongs, it also includes: Determining, according to the state parameter, whether the destination state is a state of the third state layer; if the destination state does not belong to the state of the third state layer, determining a state layer to which the destination state belongs. 如申請專利範圍第8項所述的方法,其中若該目的狀態屬於該第三狀態層的狀態時,發送一管理指令以將該目的狀態累加至該單位使該單位表現出該目的狀態。 The method of claim 8, wherein if the destination state belongs to the state of the third state layer, a management command is sent to accumulate the destination state to the unit such that the unit exhibits the destination state. 一種業務平台中單位狀態控制的系統,用於控制該單位表示一目的狀態,該系統包括:一外部介面單元,用於提供一外部介面,以接收輸入的一狀態控制指令,並根據接收到的該狀態控制指令生成相應的一狀態參數;一判定單元,用於判定一單位是否滿足一第一預設條件;若該單位滿足該第一預設條件,則根據該狀態參數來確定該目的狀態所屬的一狀態層,若該單位不滿足該第一預設條件,則發送一第一指令以表明狀態表現失敗的一第一原因;還用於根據該狀態參數判定該目的狀態是否滿足所確定的該狀態層的一第二預設條件,若該目的狀態不滿足確定的狀態層的該第二預設條件,則發送一第二指令以表明狀態表現失敗的一第二原因;以及一控制單元,用於當該目的狀態滿足所確定的該狀態層的該第二預設條件時,控制該單位表現該目的狀態;其中,該目的狀態包含該單位的多種獨立式的行為表現,該些獨立式的行為表現之間依據是否互斥而區分為多種狀態層,且相同狀態層中的多種獨立式的行為表現為互斥,而不同狀態層中的多種獨立式的行為表現之間允許互相搭配而使該單位表現出一複合式的行為表現。 A system for unit state control in a service platform for controlling a unit to indicate a destination state, the system comprising: an external interface unit for providing an external interface to receive an input state control command, and according to the received The state control command generates a corresponding state parameter; a determining unit is configured to determine whether a unit satisfies a first preset condition; if the unit satisfies the first preset condition, determining the target state according to the state parameter a first state layer, if the unit does not satisfy the first preset condition, sending a first instruction to indicate a first cause of failure of the state performance; and further for determining whether the destination state is satisfied according to the state parameter a second preset condition of the state layer, if the destination state does not satisfy the second preset condition of the determined state layer, sending a second instruction to indicate a second cause of failure of the state performance; and a control a unit, configured to control the unit to represent the target state when the destination state satisfies the determined second preset condition of the state layer; The target state includes a plurality of independent behaviors of the unit, and the independent behaviors are distinguished into multiple state layers according to whether they are mutually exclusive, and multiple independent behaviors in the same state layer are mutually exclusive. And the multiple independent behaviors in different state layers allow for mutual matching so that the unit exhibits a composite behavior. 如申請專利範圍第10項所述的系統,其中該判定單元還用於判定該單位的類型是否為一支援狀態轉換控制的類型,及判定該單位是否具有一生命條件,當該單位的類型為該支援狀態轉換控制的類型且該單位具有該生命條件時,則該判定單元判定該單位滿足該第一預設條件。 The system of claim 10, wherein the determining unit is further configured to determine whether the type of the unit is a type of support state transition control, and determine whether the unit has a life condition, and when the type of the unit is When the type of the state transition control is supported and the unit has the life condition, the determining unit determines that the unit satisfies the first preset condition. 如申請專利範圍第10項所述的系統,還包括:一記錄單元,用於記錄對該單位的狀態進行分層後的一第一狀態層及一第二狀態層,及該第一狀態層與該第二狀態層中的狀態,其中該單位在該第一狀態層的狀態為互斥狀態,該第二狀態層的狀態與該第一狀態層的狀態為非互斥狀態;以及一存儲單元,用於存儲在該第一狀態層上設置的一第一可轉換狀態清單,存儲在該第二狀態層上設置的一第二可轉換狀態清單,其中,該第一可轉換狀態清單存儲有當前該第一狀態層中的狀態可轉換為的其他狀態資訊,該第二可轉換狀態清單存儲有當前在該第二狀態層中的狀態可轉換為的其他狀態資訊。 The system of claim 10, further comprising: a recording unit, configured to record a first state layer and a second state layer layered by the state of the unit, and the first state layer And a state in the second state layer, wherein the state of the unit in the first state layer is a mutually exclusive state, the state of the second state layer and the state of the first state layer are non-exclusive states; and a storage a unit, configured to store a first switchable state list set on the first state layer, and store a second switchable state list set on the second state layer, where the first convertible state list is stored There is other state information that the state in the first state layer can be converted to, and the second switchable state list stores other state information that the state currently in the second state layer can be converted into. 如申請專利範圍第12項所述的系統,其中該判定單元還用於判定該目的狀態是否屬於該第一狀態層及該第二狀態層中的狀態,若該目的狀態是屬於該第一狀態層及該第二狀態層中的狀態,該判定單元還用於根據該狀態參數確定該目的狀態所屬該第一狀態層及該第二狀態層中的哪一狀態層。 The system of claim 12, wherein the determining unit is further configured to determine whether the destination state belongs to a state in the first state layer and the second state layer, if the destination state belongs to the first state The determining unit is further configured to determine, according to the state parameter, which of the first state layer and the second state layer the destination state belongs to. 如申請專利範圍第13項所述的系統,還包括:一進入介面單元,用於提供一進入介面,以使該控制單元調用該進入介面從而使該單位進入相應的狀態,完成相應的功能並呈現相應的動畫效果;及 一退出介面單元,用於提供一退出介面,以使該控制單元調用該退出介面從而使該單位退出相應的狀態,完成退出相應的功能;其中,該判定單元還用於根據該狀態參數判定所確定的狀態層的狀態轉換清單是否存儲有該目的狀態,並判定該目的狀態是否被鎖定;該控制單元還用於當確定的狀態層的該狀態轉換清單存儲有該目的狀態且該目的狀態未被鎖定時,退出所確定的該狀態層的當前狀態,進入該目的狀態,從而控制該單位表現該目的狀態。 The system of claim 13, further comprising: an access interface unit for providing an access interface, so that the control unit invokes the entry interface to cause the unit to enter a corresponding state, and complete the corresponding function. Presenting corresponding animation effects; and An exit interface unit, configured to provide an exit interface, so that the control unit invokes the exit interface to cause the unit to exit the corresponding state, and completes the exit corresponding function; wherein the determining unit is further configured to determine the location according to the state parameter Determining whether the state transition list of the state layer stores the destination state and determining whether the destination state is locked; the control unit is further configured to: when the state transition list of the determined state layer stores the destination state and the destination state is not When locked, the current state of the determined state layer is exited, and the destination state is entered, thereby controlling the unit to represent the destination state. 如申請專利範圍第14項所述的系統,還包括:一修改單元,用於當該單位退出所確定的該狀態層的當前狀態,並進入該目的狀態時,將所確定的該狀態層的該狀態轉換清單中的狀態修改該目的狀態可轉換為的其他狀態;該存儲單元還用於存儲修改後的該狀態轉換清單;其中,該修改單元還用於當該單位退出該目的狀態時,將該確定的該狀態層的該狀態轉換清單中的狀態修改為一預設狀態。 The system of claim 14, further comprising: a modifying unit, configured to: when the unit exits the determined current state of the state layer, and enters the destination state, the determined state layer The state in the state transition list modifies other states to which the destination state can be converted; the storage unit is further configured to store the modified state transition list; wherein the modifying unit is further configured to: when the unit exits the destination state, The determined state in the state transition list of the state layer is modified to a preset state. 如申請專利範圍第14項所述的系統,還包括:一發送單元,用於在該判定單元判定接收到了一優先順序指令,且該單位當前的狀態中有屬於該第一狀態層及該第二狀態層中較高優先順序的狀態層中的狀態時,發送一鎖定指令;及一狀態鎖單元,用於根據該鎖定指令鎖定該目的狀態所在的該狀態層,以禁止控制該單位表示該目的狀態。 The system of claim 14, further comprising: a sending unit, configured to determine, by the determining unit, that a priority order instruction is received, and the current state of the unit belongs to the first state layer and the first a state in the higher priority order state layer of the second state layer, sending a lock instruction; and a state lock unit for locking the state layer in which the destination state is located according to the lock instruction, to prohibit the control of the unit from indicating the Destination status. 如申請專利範圍第16項所述的系統,其中該記錄單元還用於記錄對該單位的狀態進行分層後的一第三狀態層;該第三狀態層的狀態為非互斥狀態,且與該第一狀態層與該第二狀態層的狀態為非互斥狀態; 該判定單元還用於根據該狀態參數判定該目的狀態是否為該第三狀態層的狀態,當該目的狀態不屬於該第三狀態層的狀態時,確定該目的狀態所屬的狀態層。 The system of claim 16, wherein the recording unit is further configured to record a third state layer layered by the state of the unit; the state of the third state layer is a non-exclusive state, and And the states of the first state layer and the second state layer are non-exclusive states; The determining unit is further configured to determine, according to the state parameter, whether the destination state is a state of the third state layer, and when the destination state does not belong to the state of the third state layer, determine a state layer to which the destination state belongs. 如申請專利範圍第17項所述的系統,其中該發送單元還用於當該目的狀態屬於該第三狀態層的狀態時,發送一管理指令以將該目的狀態累加至該單位,使該單位表現出該目的狀態。 The system of claim 17, wherein the sending unit is further configured to: when the destination state belongs to the state of the third state layer, send a management command to accumulate the target state to the unit, so that the unit Show the state of the purpose.
TW102134018A 2012-10-23 2013-09-18 Method and system for controlling status of unit of service platform TWI587897B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210406049.8A CN103777932B (en) 2012-10-23 2012-10-23 The method and system that unit state controls in a kind of business platform

Publications (2)

Publication Number Publication Date
TW201416117A TW201416117A (en) 2014-05-01
TWI587897B true TWI587897B (en) 2017-06-21

Family

ID=50570216

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102134018A TWI587897B (en) 2012-10-23 2013-09-18 Method and system for controlling status of unit of service platform

Country Status (2)

Country Link
CN (1) CN103777932B (en)
TW (1) TWI587897B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6280953B2 (en) * 2016-06-14 2018-02-14 株式会社バンダイ GAME DEVICE, GAME ARTICLE, AND PROGRAM
WO2022269318A1 (en) * 2021-06-21 2022-12-29 Sensetime International Pte. Ltd. Methods, apparatuses, devices, and storage media for controlling game states

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201043302A (en) * 2009-03-16 2010-12-16 Konami Digital Entertainment Game device, game system, game processing method, information recording medium, and program
TW201129949A (en) * 2010-02-26 2011-09-01 Univ Nat Taiwan Normal Game-playing method and game-playing apparatus for training fire escape

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4850885B2 (en) * 2008-10-02 2012-01-11 株式会社コナミデジタルエンタテインメント GAME DEVICE, GAME DEVICE CONTROL METHOD, AND PROGRAM

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW201043302A (en) * 2009-03-16 2010-12-16 Konami Digital Entertainment Game device, game system, game processing method, information recording medium, and program
TW201129949A (en) * 2010-02-26 2011-09-01 Univ Nat Taiwan Normal Game-playing method and game-playing apparatus for training fire escape

Also Published As

Publication number Publication date
TW201416117A (en) 2014-05-01
CN103777932B (en) 2018-10-09
CN103777932A (en) 2014-05-07

Similar Documents

Publication Publication Date Title
US11494322B2 (en) Computing system with hardware reconfiguration mechanism and method of operation thereof
CN106464530B (en) The method and system for the dynamic dispatching that network updates
CN104065509B (en) A kind of SDN multi-controller dispositions methods for reducing management load overhead
CN102752198B (en) Multi-core message forwarding method, multi-core processor and network equipment
US8813093B2 (en) Integration of disparate applications on a network
US9888065B2 (en) Defragmenting clusters with reserved resources
CN110474774A (en) Block creation method and block chain node in system based on block chain
US10013165B2 (en) Remote memory swapping method, apparatus and system
CN102103497A (en) Finite state machine actuating device and method, and method for establishing and using finite state machine
TWI587897B (en) Method and system for controlling status of unit of service platform
US10541858B2 (en) Thin client system, management server, workplace environment setting method and workplace environment setting program
CN103080903A (en) Scheduler, multi-core processor system, and scheduling method
CN106464532A (en) Network-state management service
CN103944974B (en) A kind of protocol message processing method, controller failure processing method and relevant device
CN105893113A (en) Management system and management method of virtual machine
CN101605104A (en) Flow forwarding method in the stack equipment and equipment
CN104216684B (en) A kind of multi-core parallel concurrent system and its data processing method
WO2018099391A1 (en) Service state transition method and device
CN106576260A (en) Policy coordination method and apparatus in NFV system
CN109426239B (en) Locomotive sequence control system and method
JP2020123003A (en) Virtualization platform and scaling management method of virtualization platform
US20170192685A1 (en) Variable-RPM Hard Disk Drive Control
CN104702654A (en) Video cloud storage system based storage and extraction performance balancing method and device
JP2011003072A (en) Multi-core processor system
CN104782163A (en) Methods and apparatuses for function coordination control