Exemplo n.º 1
0
    private void checkIfCollected(RespawnResponse respawnResponse)
    {
        switch (respawnResponse.State)
        {
        case RespawnState.READY_FOR_PICKUP:
            break;

        case RespawnState.NOT_AVAILABLE:
            pickup(sendPickupEvent: false);
            break;

        case RespawnState.WAITING_TO_RESPAWN:
            pickup(sendPickupEvent: false);
            break;
        }
    }
Exemplo n.º 2
0
    private void checkIfCollected(RespawnResponse respawnResponse)
    {
        switch (respawnResponse.State)
        {
        case RespawnState.NOT_AVAILABLE:
            SetState(ClamState.NOT_AVAILABLE);
            break;

        case RespawnState.READY_FOR_PICKUP:
            SetState(ClamState.READY_FOR_PICKUP);
            break;

        case RespawnState.WAITING_TO_RESPAWN:
            registerToRespawn(respawnResponse.Time);
            SetState(ClamState.WAITING_TO_RESPAWN);
            break;
        }
    }
Exemplo n.º 3
0
    private void checkIfCollected(RespawnResponse respawnResponse)
    {
        switch (respawnResponse.State)
        {
        case RespawnState.NOT_AVAILABLE:
            setNotAvailable();
            break;

        case RespawnState.READY_FOR_PICKUP:
            setAvailable();
            break;

        case RespawnState.WAITING_TO_RESPAWN:
            registerToRespawn(respawnResponse.Time);
            setNotAvailable();
            break;
        }
    }
Exemplo n.º 4
0
 public override void StartCollectible(RespawnResponse respawnResponse)
 {
     isInitialized = true;
     checkIfCollected(respawnResponse);
 }
Exemplo n.º 5
0
 public virtual void StartCollectible(RespawnResponse respawnResponse)
 {
     Log.LogError(this, $"You shouldn't see this message. Method 'startCollectible' must be overidden in the extended class");
 }
    private void setCollectibleState(Collectible scriptObj)
    {
        RespawnResponse respawnState = getRespawnState(scriptObj);

        scriptObj.StartCollectible(respawnState);
    }