예제 #1
0
 public void Initialize()
 {
     _currentQuantiteFragment = 0;
     _speed = 100;
     _quantiteTransportableMax = ConstantesManager.TRUCK_QUANTITE_TRANSPADABLE_BASE;
     _enumDirection            = Enum_TruckDirection.decharge;
 }
예제 #2
0
    void Start()
    {
        _currentQuantiteFragment = 0;
        _speed = 100;
        _quantiteTransportableMax = ConstantesManager.TRUCK_QUANTITE_TRANSPADABLE_BASE;
        _enumDirection            = Enum_TruckDirection.decharge;
        _city     = GameObject.FindGameObjectWithTag("City").GetComponent <City> ();
        _decharge = GameObject.FindGameObjectWithTag("Decharge").GetComponent <Decharge> ();
        Vector3 pos = this.transform.localPosition;

        pos.y = -35;
        this.transform.localPosition = pos;
    }
예제 #3
0
    private void ActionArrive()
    {
        switch (_enumDirection)
        {
        case Enum_TruckDirection.city:
            GiveFragment();
            _enumDirection = Enum_TruckDirection.decharge;
            _textureFull.SetActive(false);
            _textureEmpty.SetActive(true);
            break;

        case Enum_TruckDirection.decharge:
            TakeFragment();
            _enumDirection = Enum_TruckDirection.city;
            _textureFull.SetActive(true);
            _textureEmpty.SetActive(false);

            break;

        default:
            Debug.Log("Wrong _enumDirection du truck");
            break;
        }
    }