예제 #1
0
 public IEnumerator Rise(bool checkIn)
 {
     while (checkIn)
     {
         if (ath.stuck)
         {
             checkIn = false;
             break;
             currentState = FSM_STATE.MOVING;
         }
     }
     yield return(null);
 }
예제 #2
0
 public DHCP_FAILOVER_RELATIONSHIP_Managed(DHCP_IP_ADDRESS primaryServer, DHCP_IP_ADDRESS secondaryServer, DHCP_FAILOVER_MODE mode, DHCP_FAILOVER_SERVER serverType, FSM_STATE state, FSM_STATE prevState, int mclt, int safePeriod, string relationshipName, string primaryServerName, string secondaryServerName, IntPtr scopesPointer, byte percentage, string sharedSecret)
 {
     PrimaryServer       = primaryServer;
     SecondaryServer     = secondaryServer;
     Mode                = mode;
     ServerType          = serverType;
     State               = state;
     PrevState           = prevState;
     Mclt                = mclt;
     SafePeriod          = safePeriod;
     RelationshipName    = relationshipName;
     PrimaryServerName   = primaryServerName;
     SecondaryServerName = secondaryServerName;
     ScopesPointer       = scopesPointer;
     Percentage          = percentage;
     SharedSecret        = sharedSecret;
 }
예제 #3
0
        /// <summary>
        /// Constructor to support DhcpV4FailoverAddScopeToRelationship
        /// </summary>
        public DHCP_FAILOVER_RELATIONSHIP_Managed(string relationshipName, DHCP_IP_ARRAY_Managed scopes)
        {
            PrimaryServer       = (DHCP_IP_ADDRESS)0;
            SecondaryServer     = (DHCP_IP_ADDRESS)0;
            Mode                = (DHCP_FAILOVER_MODE)(-1);
            ServerType          = (DHCP_FAILOVER_SERVER)(-1);
            State               = (FSM_STATE)(-1);
            PrevState           = (FSM_STATE)(-1);
            Mclt                = -1;
            SafePeriod          = -1;
            RelationshipName    = relationshipName;
            PrimaryServerName   = null;
            SecondaryServerName = null;
            Percentage          = 0xFF;
            SharedSecret        = null;

            ScopesPointer = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(DHCP_IP_ARRAY_Managed)));
            Marshal.StructureToPtr(scopes, ScopesPointer, false);
        }
예제 #4
0
        public DHCP_FAILOVER_RELATIONSHIP_Managed(DHCP_IP_ADDRESS primaryServer, DHCP_IP_ADDRESS secondaryServer, DHCP_FAILOVER_MODE mode, DHCP_FAILOVER_SERVER serverType, FSM_STATE state, FSM_STATE prevState, int mclt, int safePeriod, string relationshipName, string primaryServerName, string secondaryServerName, DHCP_IP_ARRAY_Managed scopes, byte percentage, string sharedSecret)
        {
            PrimaryServer       = primaryServer;
            SecondaryServer     = secondaryServer;
            Mode                = mode;
            ServerType          = serverType;
            State               = state;
            PrevState           = prevState;
            Mclt                = mclt;
            SafePeriod          = safePeriod;
            RelationshipName    = relationshipName;
            PrimaryServerName   = primaryServerName;
            SecondaryServerName = secondaryServerName;
            Percentage          = percentage;
            SharedSecret        = sharedSecret;

            ScopesPointer = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(DHCP_IP_ARRAY_Managed)));
            Marshal.StructureToPtr(scopes, ScopesPointer, false);
        }
예제 #5
0
    public IEnumerator Moving(bool checkIn)
    {
        while (checkIn)
        {
            if (ath.collide)
            {
                if (ath.Energy > 0)
                {
                    checkIn      = false;
                    ath.position = true;
                    break;
                    currentState = FSM_STATE.DEAD;
                }
                else
                {
                    checkIn      = false;
                    currentState = FSM_STATE.GAMEOVER;
                }
            }
        }

        yield return(null);
    }
예제 #6
0
 // Start is called before the first frame update
 void Start()
 {
     currentState = FSM_STATE.RISE;
     ath          = GetComponent <FPSAthlete>();
 }