Example #1
0
        public bool Equals(Garage other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Type.Equals(other.Type) &&
                   State.Equals(other.State) &&
                   Field02h.Equals(other.Field02h) &&
                   ClosingWithoutTargetVehicle.Equals(other.ClosingWithoutTargetVehicle) &&
                   Deactivated.Equals(other.Deactivated) &&
                   ResprayHappened.Equals(other.ResprayHappened) &&
                   TargetModelIndex.Equals(other.TargetModelIndex) &&
                   Door1Pointer.Equals(other.Door1Pointer) &&
                   Door2Pointer.Equals(other.Door2Pointer) &&
                   Door1Handle.Equals(other.Door1Handle) &&
                   Door2Handle.Equals(other.Door2Handle) &&
                   IsDoor1Dummy.Equals(other.IsDoor1Dummy) &&
                   IsDoor2Dummy.Equals(other.IsDoor2Dummy) &&
                   RecreateDoorOnNextRefresh.Equals(other.RecreateDoorOnNextRefresh) &&
                   RotatingDoor.Equals(other.RotatingDoor) &&
                   CameraFollowsPlayer.Equals(other.CameraFollowsPlayer) &&
                   X1.Equals(other.X1) &&
                   X2.Equals(other.X2) &&
                   Y1.Equals(other.Y1) &&
                   Y2.Equals(other.Y2) &&
                   Z1.Equals(other.Z1) &&
                   Z2.Equals(other.Z2) &&
                   DoorOpenOffset.Equals(other.DoorOpenOffset) &&
                   DoorOpenMax.Equals(other.DoorOpenMax) &&
                   Door1X.Equals(other.Door1X) &&
                   Door1Y.Equals(other.Door1Y) &&
                   Door2X.Equals(other.Door2X) &&
                   Door2Y.Equals(other.Door2Y) &&
                   Door1Z.Equals(other.Door1Z) &&
                   Door2Z.Equals(other.Door2Z) &&
                   Timer.Equals(other.Timer) &&
                   CollectedCarsState.Equals(other.CollectedCarsState) &&
                   TargetCarPointer.Equals(other.TargetCarPointer) &&
                   Field96h.Equals(other.Field96h) &&
                   StoredCar.Equals(other.StoredCar));
        }
Example #2
0
        public bool Equals(Garage other)
        {
            if (other == null)
            {
                return(false);
            }

            return(Type.Equals(other.Type) &&
                   State.Equals(other.State) &&
                   MaxCarsAllowed.Equals(other.MaxCarsAllowed) &&
                   ClosingWithoutTargetVehicle.Equals(other.ClosingWithoutTargetVehicle) &&
                   Deactivated.Equals(other.Deactivated) &&
                   ResprayHappened.Equals(other.ResprayHappened) &&
                   Door1Pointer.Equals(other.Door1Pointer) &&
                   Door2Pointer.Equals(other.Door2Pointer) &&
                   Door1Handle.Equals(other.Door1Handle) &&
                   Door2Handle.Equals(other.Door2Handle) &&
                   IsDoor1Dummy.Equals(other.IsDoor1Dummy) &&
                   IsDoor2Dummy.Equals(other.IsDoor2Dummy) &&
                   RecreateDoorOnNextRefresh.Equals(other.RecreateDoorOnNextRefresh) &&
                   RotatingDoor.Equals(other.RotatingDoor) &&
                   CameraFollowsPlayer.Equals(other.CameraFollowsPlayer) &&
                   Position.Equals(other.Position) &&
                   Rotation.Equals(other.Rotation) &&
                   CeilingZ.Equals(other.CeilingZ) &&
                   DoorRelated1.Equals(other.DoorRelated1) &&
                   DoorRelated2.Equals(other.DoorRelated2) &&
                   X1.Equals(other.X1) &&
                   X2.Equals(other.X2) &&
                   Y1.Equals(other.Y1) &&
                   Y2.Equals(other.Y2) &&
                   DoorOpenOffset.Equals(other.DoorOpenOffset) &&
                   DoorOpenMax.Equals(other.DoorOpenMax) &&
                   Door1X.Equals(other.Door1X) &&
                   Door1Y.Equals(other.Door1Y) &&
                   Door2X.Equals(other.Door2X) &&
                   Door2Y.Equals(other.Door2Y) &&
                   Door1Z.Equals(other.Door1Z) &&
                   Door2Z.Equals(other.Door2Z) &&
                   Timer.Equals(other.Timer));
        }
Example #3
0
    void Start()
    {
        cam = Camera.main.GetComponent <CameraFollowsPlayer>();

        if (isLooping)
        {
            //Récupération des enfants ayant un SpriteRenderer (visibles)
            backgroundParts = new List <Transform>();
            for (int i = 0; i < transform.childCount; i++)
            {
                Transform child = transform.GetChild(i);

                if (child.GetComponent <SpriteRenderer>() != null)
                {
                    backgroundParts.Add(child);
                }
            }

            //Tri par position de gauche à droite
            backgroundParts = backgroundParts.OrderBy(t => t.position.x).ToList();
        }
    }